This is a static analysis toolkit for SQL that doesn't touch your actual database. It gives Claude five tools: sql_format for prettifying queries, sql_explain for translating SQL into plain English with optimization hints, schema_analyze for parsing CREATE TABLE statements and generating Mermaid ER diagrams, query_build for generating SQL from natural language, and migration_generate for diffing two schemas and producing ALTER TABLE statements with rollback support. Useful when you're working with SQL in documentation, learning queries, or need quick schema visualization without spinning up a database connection. Supports MySQL, PostgreSQL, and SQLite syntax across all tools.
MCP server providing SQL and database tools for AI agents. All analysis is performed on SQL text — no actual database connection required.
Format and prettify SQL queries with proper indentation, uppercased keywords, and aligned columns. Supports MySQL, PostgreSQL, and SQLite syntax.
Take a SQL query and explain what it does in plain English, step by step. Identifies query type, tables, columns, conditions, and provides optimization tips.
Parse CREATE TABLE statements to extract tables, columns, types, constraints, foreign keys, and indexes. Generates an ER diagram in Mermaid format.
Build SQL queries from natural language descriptions. Supports common patterns like filtering by date, aggregation, joins, ordering, and pagination.
Compare two schemas (old vs new CREATE TABLE statements) and generate ALTER TABLE migration statements. Produces both up (forward) and down (rollback) migrations.
npm install
npm run build
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"database-tools": {
"command": "node",
"args": ["path/to/mcp-database-tools/dist/index.js"]
}
}
}
npm start
npm run build # Compile TypeScript
npm start # Run the server
MIT
hovecapital/read-only-local-postgres-mcp-server
cocaxcode/database-mcp
io.github.infoinlet-marketplace/mcp-mysql
io.github.cybeleri/database-admin
io.github.yash-0620/postgres-mcp-secured