drio
Open app

mcp-server-sql-analyzer

Source

MCP server for SQL static analysis.

Catalog onlyCatalog onlySTDIO

Overview

The mcp-server-sql-analyzer is a Model Context Protocol (MCP) server designed for SQL static analysis, providing tools for SQL syntax validation, linting, and dialect conversion using SQLGlot.

To use the mcp-server-sql-analyzer, configure it in your claude_desktop_config.json file and utilize its tools for validating SQL queries, converting between SQL dialects, and analyzing table and column references.

  • SQL syntax validation and linting - Conversion of SQL queries between different dialects (e.g., MySQL to PostgreSQL) - Extraction and analysis of table references and dependencies - Identification of column usage and relationships - Discovery of supported SQL dialects
  1. Validating SQL queries before execution to prevent syntax errors.
  2. Migrating SQL queries between different database systems seamlessly.
  3. Analyzing complex SQL queries to understand their structure and optimize performance.
  4. Ensuring compatibility with specific SQL dialects for best practices.

Add to your AI client

Use these steps to connect mcp-server-sql-analyzer in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mcp-server-sql-analyzer-j4c0bs": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-sql-analyzer-j4c0bs"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mcp-server-sql-analyzer-j4c0bs": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-sql-analyzer-j4c0bs"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mcp-server-sql-analyzer-j4c0bs": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-sql-analyzer-j4c0bs"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-server-sql-analyzer-j4c0bs": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-sql-analyzer-j4c0bs"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-server-sql-analyzer-j4c0bs": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-sql-analyzer-j4c0bs"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mcp-server-sql-analyzer-j4c0bs": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-sql-analyzer-j4c0bs"
      ]
    }
  }
}

FAQ

Can this server validate all SQL dialects?

Yes! The server supports multiple SQL dialects and can validate queries accordingly.

Is there a way to convert SQL queries automatically?

Yes! The server provides a tool to convert SQL queries between different dialects.

How can I run the server in development mode?

You can clone the repository and run it using the provided commands in the documentation.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":906,"uuid":"3ca806a8-3a1c-423a-adae-2d8dfb03bb72","name":"mcp-server-sql-analyzer","title":"mcp-server-sql-analyzer","description":"MCP server for SQL static analysis.","avatar_url":"https://avatars.githubusercontent.com/u/20891193?v=4","created_at":"2025-01-28T02:17:28.712Z","updated_at":"2025-02-23T07:13:17.436Z","status":"created","author_name":"j4c0bs","author_avatar_url":"https://avatars.githubusercontent.com/u/20891193?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/j4c0bs/mcp-server-sql-analyzer","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"16\",\"license\":\"MIT license\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-01-30 10:45:18\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]