MCP server for SQL static analysis.
A Model Context Protocol (MCP) server that provides SQL analysis, linting, and dialect conversion capabilities using SQLGlot.
The SQL Analyzer MCP server provides tools for analyzing and working with SQL queries. It helps with:
As an AI assistant, this server enhances my ability to help users work with SQL efficiently by:
Query Validation: I can instantly validate SQL syntax before suggesting it to users, ensuring I provide correct and dialect-appropriate queries.
Dialect Conversion: When users need to migrate queries between different database systems, I can accurately convert the syntax while preserving the query’s logic.
Code Analysis: The table and column reference analysis helps me understand complex queries, making it easier to explain query structure and suggest optimizations.
Compatibility Checking: By knowing the supported dialects and their specific features, I can guide users toward database-specific best practices.
This toolset allows me to provide more accurate and helpful SQL-related assistance while reducing the risk of syntax errors or dialect-specific issues.
Update your personal preferences in Claude Desktop settings to request that generated SQL is first validated using the lint_sql
tool.
lint_sql
transpile_sql
get_all_table_references
get_all_column_references
dialects://all
Returns a list of all supported SQL dialects for use in all tools.
Add this to your 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"
]
}
}
}
After cloning this repo, add this to your claude_desktop_config.json
:
{
"mcpServers": {
"sql-analyzer": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-server-sql-analyzer",
"run",
"mcp-server-sql-analyzer"
]
}
}
}
To run the server in development mode:
## Clone the repository
git clone [email protected]:j4c0bs/mcp-server-sql-analyzer.git
## Run the server
npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-server-sql-analyzer run mcp-server-sql-analyzer
To run unit tests:
uv run pytest .
MIT
Mcp Codex Keeper
An intelligent MCP server that serves as a guardian of development knowledge, providing Cline assistants with curated access to latest documentation and best practices across the software development landscape
Gitlab Mcp
gitlab mcp
Uiflowchartcreator
MCP server for creating UI flowcharts