mcp-server-sql-analyzer
@j4c0bs
About mcp-server-sql-analyzer
MCP server for SQL static analysis.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-server-sql-analyzer": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"uv",
"--directory",
"/path/to/mcp-server-sql-analyzer",
"run",
"mcp-server-sql-analyzer"
]
}
}
}Tools
8sql (string): SQL query to analyze
ParseResult containing:
sql (string): SQL statement to transpile
TranspileResult containing:
sql (string): SQL statement to analyze
TableReferencesResult containing:
sql (string): SQL statement to analyze
ColumnReferencesResult containing:
Overview
What is mcp-server-sql-analyzer?
mcp-server-sql-analyzer is a Model Context Protocol (MCP) server that provides SQL analysis, linting, and dialect conversion using SQLGlot. It is designed for AI assistants like Claude to validate, convert, and analyze SQL queries.
How to use mcp-server-sql-analyzer?
Install the server by adding it to claude_desktop_config.json using uvx (recommended) or uv. Invoke its tools—lint_sql, transpile_sql, get_all_table_references, get_all_column_references—with SQL statements and optional dialect parameters.
Key features of mcp-server-sql-analyzer
- SQL syntax validation and linting
- Query conversion between different SQL dialects
- Extract table references and dependencies
- Identify column usage and relationships
- Discover all supported SQL dialects
Use cases of mcp-server-sql-analyzer
- Validate SQL syntax before suggesting queries to users
- Convert queries when migrating between database systems
- Analyze complex queries to understand structure and dependencies
- Check dialect compatibility for database-specific best practices
FAQ from mcp-server-sql-analyzer
What does the lint_sql tool do?
It validates SQL query syntax and returns any errors, including the line and column position of the issue.
How do I convert SQL between dialects?
Use the transpile_sql tool, specifying the source dialect with read_dialect and the target dialect with write_dialect.
What dialects are supported?
Use the dialects://all resource to retrieve a complete list of all supported SQL dialects.
What are the dependencies and runtime requirements?
The server requires SQLGlot and is installed via uvx from a git repository or uv from a local clone. No other runtime dependencies are mentioned.
How is the server configured?
Add the server to your claude_desktop_config.json under mcpServers with either the uvx or uv command, as shown in the README.
Frequently asked questions
What does the `lint_sql` tool do?
It validates SQL query syntax and returns any errors, including the line and column position of the issue.
How do I convert SQL between dialects?
Use the `transpile_sql` tool, specifying the source dialect with `read_dialect` and the target dialect with `write_dialect`.
What dialects are supported?
Use the `dialects://all` resource to retrieve a complete list of all supported SQL dialects.
What are the dependencies and runtime requirements?
The server requires SQLGlot and is installed via `uvx` from a git repository or `uv` from a local clone. No other runtime dependencies are mentioned.
How is the server configured?
Add the server to your `claude_desktop_config.json` under `mcpServers` with either the `uvx` or `uv` command, as shown in the README.
Basic information
More Databases MCP servers
Elasticsearch MCP Server
elastic
Lawstronaut
Lawstronaut-FZCOAccess millions of official legal and regulatory source documents from 155+ jurisdictions via MCP. Lawstronaut supports AI agents with structured legal research, legal data, laws, regulations, cases, guidance, official s
Dbhub
bytebaseZero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.
MCP Server for MySQL based on NodeJS
benborlaA Model Context Protocol server that provides read-only access to MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
mcp_mysql_server
wenb1n-devModel Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Comments