
How to add SQL Analyzer to Windsurf
SQL static analysis, linting, and dialect conversion for your AI assistant, powered by SQLGlot. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.
Last updated June 14, 2026 · 31★ · stdio · no auth
Windsurf 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 Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the SQL Analyzer config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 5SQL Analyzer's tools become available to Cascade.
Before you start
- uv / uvx (Astral) to run the server
- Python (server is implemented in Python)
What SQL Analyzer can do in Windsurf
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 + Windsurf FAQ
Where is the Windsurf config file?
Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_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.