
How to add SQL Analyzer to Claude Desktop
SQL static analysis, linting, and dialect conversion for your AI assistant, powered by SQLGlot. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.
Last updated June 14, 2026 ยท 31โ ยท stdio ยท no auth
Claude Desktop config for SQL Analyzer
{
"mcpServers": {
"sql-analyzer": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/j4c0bs/mcp-server-sql-analyzer.git",
"mcp-server-sql-analyzer"
]
}
}
}Requires `uv` (the Python package runner). Install it from https://docs.astral.sh/uv/ if `uvx` is not found.
Setup steps
- 1Open Claude Desktop โ Settings โ Developer โ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
- 2Paste the SQL Analyzer config below under the top-level "mcpServers" key.
- 3Fill in any placeholder secrets (API keys, paths) in the snippet.
- 4Save the file, then fully quit and reopen Claude Desktop.
- 5Open a chat and confirm SQL Analyzer's tools appear under the ๐ tools menu.
Before you start
- uv / uvx (Astral) to run the server
- Python (server is implemented in Python)
What SQL Analyzer can do in Claude Desktop
lint_sqlValidates SQL query syntax and returns any errors. Inputs: sql (string), dialect (string, optional). Returns a ParseResult with is_valid (boolean), message (string), and optional position (line and column of error).
transpile_sqlConverts SQL between different dialects. Inputs: sql (string), read_dialect (string, source dialect), write_dialect (string, target dialect). Returns a TranspileResult with is_valid (boolean), message (string), and sql (the transpiled SQL if successful).
get_all_table_referencesExtracts table and CTE references from SQL. Inputs: sql (string), dialect (string, optional). Returns a TableReferencesResult with is_valid, message, and tables (list of references with type, catalog, database, table name, alias, and fully qualified name).
get_all_column_referencesExtracts column references with table context. Inputs: sql (string), dialect (string, optional). Returns a ColumnReferencesResult with is_valid, message, and columns (list of references with column name, table name, and fully qualified name).
SQL Analyzer + Claude Desktop FAQ
Where is the Claude Desktop config file?
Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the SQL Analyzer config there under the "mcpServers" key and restart the client.
Does it connect to my database?
No. The server performs static analysis of SQL text using SQLGlot. It does not connect to or query any database, and requires no credentials.
How do I discover supported dialects?
The server exposes a resource at dialects://all that returns a list of all supported SQL dialects for use in the tools.
Can I run it from a local clone instead of git?
Yes. The README documents a uv-based config using --directory /path/to/mcp-server-sql-analyzer run mcp-server-sql-analyzer after cloning the repo, as an alternative to the recommended uvx install.