MCP Directory

SQL Analyzer

SQL static analysis, linting, and dialect conversion for your AI assistant, powered by SQLGlot.

Unverified
stdio (local)
No auth
Stale
Python

Add to your client

Copy the config for your MCP client and paste it into its config file.

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "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.

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • uv / uvx (Astral) to run the server
  • Python (server is implemented in Python)

About SQL Analyzer

An MCP server for SQL static analysis built on SQLGlot. It exposes tools to lint SQL syntax, transpile queries between dialects, and extract table and column references, plus a resource that lists all supported SQL dialects. It runs locally over stdio and requires no authentication or database connection — analysis is purely static.

Tools & capabilities (4)

lint_sql

Validates 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_sql

Converts 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_references

Extracts 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_references

Extracts 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).

What this server can do

SQL Analyzer provides tools for these capabilities — tap one to see every MCP server that does the same:

When to use it

  • Validate generated SQL syntax before running or suggesting it
  • Migrate queries between database systems (e.g., MySQL to PostgreSQL) via dialect transpilation
  • Analyze table, CTE, and column dependencies in complex queries
  • Discover which SQL dialects are supported for a given task

SQL Analyzer FAQ

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.

Alternatives to SQL Analyzer

Compare all alternatives →

Google's official MCP server with prebuilt BigQuery tools, querying datasets via Application Default Credentials.

Verified
stdio (local)
OAuth
Go
10 tools
Updated 23 days agoRepo

Create, manage, and query your InstantDB apps, schemas, permissions, and data from your AI editor.

Unverified
HTTP (remote)
OAuth
TypeScript
7 tools
Updated 1 day agoRepo

Zero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, and SQLite.

Unverified
stdio (local)
No auth
TypeScript
3 tools
Updated 1 day agoRepo