GoSQLX
SQL parsing, formatting, linting and injection checks for 8 dialects, as an MCP server
- Pricing
- Open source
- Platforms
- API, CLI, vscode
- Runs
- Remotely
- Version
- 1.17.0
- Listing updated
- 3 days ago
About GoSQLX
GoSQLX is an open-source MCP server for databases. It runs as a hosted remote server, so there is nothing to install locally.
GoSQLX is a pure-Go SQL parser, and its MCP server hands seven of its capabilities to an assistant: parse, format, validate, lint, analyze, detect injection and list dialects. The hosted endpoint needs no install or API key, and a Claude Code plugin and a ChatGPT connector with an analysis widget are described in the README.
The same engine ships as a Go library, a CLI, a VS Code extension, a language server for Neovim and JetBrains, a GitHub Action and a WASM playground. It handles PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite, Snowflake and ClickHouse. The site reports a hand-written 2,813-statement corpus that parses, formats and round-trips across the eight, 30 lint rules and over 3,100 tests, with the parser reaching about 2.8 million simple SELECTs a second at the parse stage on an Apple M4.
Those speed figures are the project's own benchmarks of the parse stage only, and the README puts SQL-99 coverage at an estimated 80 to 85 percent. It suits developers who want an assistant to check SQL before it ships.
Install
Run in a terminal
claude mcp add --transport http gosqlx https://mcp.gosqlx.dev/mcpAdd to Settings → Connectors → Add custom connector
https://mcp.gosqlx.dev/mcpAdd to ~/.cursor/mcp.json
{
"mcpServers": {
"gosqlx": {
"url": "https://mcp.gosqlx.dev/mcp"
}
}
}Add to .vscode/mcp.json
{
"servers": {
"gosqlx": {
"type": "http",
"url": "https://mcp.gosqlx.dev/mcp"
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"gosqlx": {
"serverUrl": "https://mcp.gosqlx.dev/mcp"
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"gosqlx": {
"type": "http",
"url": "https://mcp.gosqlx.dev/mcp"
}
}
}Tools this server provides (7)
Taken from the project documentation; the running server may differ.
- parse_sql
- Parses SQL
- format_sql
- Formats SQL
- validate_sql
- Validates SQL
- lint_sql
- Lints SQL against rules
- analyze_sql
- Analyzes SQL and extracts metadata
- detect_injection
- Detects SQL injection patterns
- list_dialects
- Lists supported dialects
What it does
- Multi-dialect parsing
- Selects one of eight dialects with a single dialect string.
- Format and transpile
- Dialect-aware formatting that keeps comments and optimizer hints, plus transpiling between dialects.
- Linting
- 30 lint rules for style and correctness.
- Injection detection
- Security scanner that classifies SQL injection by severity.
- Editor support
- Language server for real-time checks in VS Code, Neovim and JetBrains.
- CI action
- GitHub Action to validate SQL files.
Good for
- Validate generated SQL before running it
- Format queries across mixed dialects
- Scan SQL for injection patterns
- Lint SQL in CI
- List which dialects an assistant can target
Pricing
Open source
Free and open source
Prices change. Check gosqlx.dev before you buy.
GoSQLX FAQ
How do I add it to Claude Code?
Run claude mcp add --transport http gosqlx https://mcp.gosqlx.dev/mcp; no API key is needed.
Which dialects are supported?
PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite, Snowflake and ClickHouse.
Is it thread-safe?
The project says it is race-detector clean in CI.
Can I use it without MCP?
Yes, as a Go library, CLI, VS Code extension or GitHub Action.
Is GoSQLX free?
Yes. GoSQLX is open source, so you can use and self-host it for free.
How do I add GoSQLX to Claude Code?
Run this command in your terminal: claude mcp add --transport http gosqlx https://mcp.gosqlx.dev/mcp
What are the best alternatives to GoSQLX?
The closest alternatives to GoSQLX are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.
Alternatives to GoSQLX

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

GitHub
MCP serverOfficial MCP server connecting AI assistants to GitHub repos, issues and workflows
Not checked yet- Remote
- Open source
- 34.5K GitHub stars
- Developer tools

Serena MCP: the IDE for your agent
MCP serverMCP toolkit giving coding agents symbol-level code retrieval and editing
Runs locally- Open source
- 31.5K GitHub stars
- Developer tools

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Ouroboros
MCP serverSpec-first layer that pins requirements and verifies results of AI coding agent work
Runs locally- Open source
- 6.4K GitHub stars
- Developer tools