Connections & Capabilities
Connects To
Capabilities
Quickstart
Install
npx @modelcontextprotocol/inspectorConfig
{
"mcpServers": {
"sql-analyzer": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/j4c0bs/mcp-server-sql-analyzer.git",
"mcp-server-sql-analyzer"
]
}
}
}Exposed MCP Tools (4)
lint_sqlValidates SQL query syntax and returns any errors.
Read-only operation; only analyzes the SQL string.
transpile_sqlConverts SQL between different dialects.
May introduce subtle errors during conversion; requires careful review.
get_all_table_referencesExtracts table and CTE references from SQL.
Read-only operation; analyzes SQL to extract table names.
get_all_column_referencesExtracts column references with table context.
Read-only operation; analyzes SQL to extract column names.
Safety Assessment
This server is generally safe for analyzing and converting SQL queries. However, users should exercise caution when using transpiled SQL in production environments and ensure proper input sanitization to prevent SQL injection vulnerabilities. The risk is moderate due to the potential for incorrect dialect conversion and the need for careful review of transpiled queries.
- Primarily read-only operations (analysis, linting)
- No direct database access or modification
- SQLGlot library is well-established for SQL parsing
- Limited execution capabilities
- Potential for SQL injection if user-provided SQL is not properly sanitized by the client
- Incorrect dialect conversion could lead to unexpected query behavior
- Reliance on SQLGlot's dialect support; unsupported dialects may cause issues
- Transpilation could introduce subtle errors if not carefully reviewed
