MCP Server SQL Analyzer logo

MCP Server SQL Analyzer

by j4c0bs

Analyzes, lints, transpiles, and inspects SQL references across supported dialects through MCP.

Install MCP Server SQL Analyzer

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "j4c0bs-mcp-server-sql-analyzer": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/j4c0bs/mcp-server-sql-analyzer.git",
        "mcp-server-sql-analyzer"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx --from git+https://github.com/j4c0bs/mcp-server-sql-analyzer.git mcp-server-sql-analyzer

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

j4c0bs/mcp-server-sql-analyzer MCP server uses SQLGlot to validate, lint, and convert SQL statements across dialects. It also extracts table, CTE, and column references, including aliases and qualified names. The server exposes these operations as MCP tools and provides a dialect discovery resource. Reach for it when an agent needs to check SQL syntax, migrate queries, or inspect query structure without connecting to a database.

Use cases

  • Validate generated SQL before presenting it
  • Convert queries between supported SQL dialects
  • Extract tables and CTEs from a statement
  • Identify columns and their table context

Key features

  • SQL syntax validation and linting
  • Cross-dialect SQL transpilation
  • Table and CTE reference extraction
  • Column reference extraction
  • SQL dialect discovery resource

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

11/11 checks healthy over the last 101d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 3d ago via OSV.dev · mcp-server-sql-analyzer (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars32Stargazers on the source repository.
Last commit1y agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Server SQL Analyzer works

What j4c0bs/mcp-server-sql-analyzer MCP server does

j4c0bs/mcp-server-sql-analyzer MCP server gives MCP clients static analysis tools for SQL. It does not execute queries or connect to a live database. Instead, it parses SQL through SQLGlot and reports whether analysis or conversion succeeded.

The server supports four main operations:

  • lint_sql checks syntax and returns validity, a status or error message, and an optional line and column position.
  • transpile_sql converts a statement from one specified dialect to another and returns the converted SQL when successful.
  • get_all_table_references identifies tables and common table expressions, including catalog, database, table, alias, and fully qualified name details.
  • get_all_column_references lists referenced columns together with their table context and fully qualified names.

These tools are useful for validating generated SQL, preparing statements for another database dialect, and examining query structure before review or migration.

How it works

Each operation receives SQL as a string. The linting and reference-analysis tools accept an optional dialect, while transpilation requires both a source dialect and a target dialect. SQLGlot performs the parsing and dialect handling, and the server returns structured results containing validity, messages, and operation-specific data.

A dialects://all resource lists the SQL dialects available to the tools. Agents can use that resource to discover valid dialect names before requesting validation, reference extraction, or conversion.

Setup and configuration

j4c0bs/mcp-server-sql-analyzer can be configured as a local stdio server in Claude Desktop. The recommended approach uses uvx to fetch and run the project directly from its Git repository:

config.json
{
  "mcpServers": {
    "sql-analyzer": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/j4c0bs/mcp-server-sql-analyzer.git",
        "mcp-server-sql-analyzer"
      ]
    }
  }
}

Alternatively, clone the repository and configure uv with the project directory and run mcp-server-sql-analyzer. Development instructions use the MCP Inspector with the same uv command. The repository documents uv run pytest . for running its unit tests. No environment variables are specified in the provided configuration.

Tools and capabilities

The SQL tools return structured responses rather than only plain text. A failed parse or conversion includes a message, while successful reference analysis returns arrays of discovered tables or columns. Dialect conversion requires the caller to identify both sides of the conversion; validation and reference extraction can omit the dialect when the default parsing behavior is sufficient.

j4c0bs/mcp-server-sql-analyzer is suited to agents that need SQL-focused inspection without database credentials. For example, an agent can lint a generated query before showing it to a user, convert MySQL syntax toward PostgreSQL syntax, or identify which tables and columns appear in a complex statement.

Limitations and notes

It does not document query execution, schema lookup, database connections, optimization recommendations, or guaranteed semantic equivalence after dialect conversion. Conversion and analysis results should therefore be reviewed for database-specific behavior.

The README provides a Claude Desktop configuration and does not document client-specific settings for other MCP hosts. Dialect names should be taken from the dialect discovery resource or from SQLGlot's supported dialect set rather than assumed.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Server SQL Analyzer

j4c0bs/mcp-server-sql-analyzer is an MCP server that connects MCP clients to SQLGlot for SQL analysis. Its main tools lint SQL, transpile statements between dialects, extract table and CTE references, and identify column references with table context. It also exposes a resource listing supported dialects.

Install it by adding a Claude Desktop stdio entry that runs `uvx` with the Git repository and `mcp-server-sql-analyzer` command. You can also clone the repository and run it through `uv` with the project directory.

It supports SQL linting, dialect conversion, table and CTE reference extraction, and column reference extraction. The tools are named `lint_sql`, `transpile_sql`, `get_all_table_references`, and `get_all_column_references`.

It analyzes SQL text with SQLGlot, converts statements between specified dialects, and returns structured parsing or reference information.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Server SQL Analyzer AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/j4c0bs-mcp-server-sql-analyzer?style=directory)](https://allmcps.com/mcp/j4c0bs-mcp-server-sql-analyzer)
HTML Embed
<a href="https://allmcps.com/mcp/j4c0bs-mcp-server-sql-analyzer"><img src="https://allmcps.com/api/badge/j4c0bs-mcp-server-sql-analyzer?style=directory" alt="MCP Server SQL Analyzer on AllMCPs" /></a>