GoSQLX — Claude Code MCP server: SQL parsing tools
Remote MCP server exposing 7 SQL tools: validation, formatting, linting and injection scanning.
claude mcp add --transport http gosqlx https://mcp.gosqlx.dev/mcpWhat GoSQLX does
GoSQLX is a pure-Go SQL parser that hands your agent 7 tools over MCP. Under the hood: a zero-copy tokenizer, a recursive descent parser and full AST generation. On top of that sit a formatter, 30 lint rules (L001–L030), 20 optimizer rules, an SQL injection scanner and metadata extraction. Eight dialects are covered: PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite, Snowflake and ClickHouse.
The server is remote, so there is nothing to install locally. One command wires it into Claude, and the agent can then validate queries, reformat them and flag risky patterns inside the conversation. The same endpoint, https://mcp.gosqlx.dev/mcp, works in Cursor, Codex, GitHub Copilot and other MCP clients.
Beyond the server the project ships a CLI, a VS Code extension, a GitHub Action and a Claude plugin with skills and slash commands. It runs over HTTP transport, so no network means no tools.
What it helps with
- validate a SQL query before running a migration
- turn a one-line query into indented, readable SQL
- scan someone else's code for SQL injection patterns
- pull the table and column list out of a query
- lint
*.sqlfiles in CI
Example prompts for the agent
- Validate this query for PostgreSQL and show me the syntax errors
- Format
query.sqlwith 2-space indent and uppercase keywords - Check this query for SQL injection patterns
How to install GoSQLX
Platform CLI: remote server
claude mcp add --transport http gosqlx https://mcp.gosqlx.dev/mcpPlatform CLI: remote server
codex mcp add gosqlx --url https://mcp.gosqlx.dev/mcpConfig file
{
"mcpServers": {
"gosqlx": {
"url": "https://mcp.gosqlx.dev/mcp"
}
}
}Config file
{
"servers": {
"gosqlx": {
"type": "http",
"url": "https://mcp.gosqlx.dev/mcp"
}
}
}Platform CLI: remote server
gemini mcp add -t http gosqlx https://mcp.gosqlx.dev/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about GoSQLX
How do I install GoSQLX in Claude Code?
Run claude mcp add --transport http gosqlx https://mcp.gosqlx.dev/mcp. The server is remote, so there is no local install step.
What does GoSQLX do?
It parses SQL into an AST and builds validation, formatting, linting, metadata extraction and injection scanning on top. The agent gets 7 tools.
Which SQL dialects does GoSQLX support?
PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite, Snowflake and ClickHouse. The --dialect flag and WithDialect accept 11 names.