rog0x

mcp-database-tools

Community rog0x
Updated

MCP server for SQL/database: format SQL, explain queries in plain English, analyze schemas, build queries from natural language, generate migrations

mcp-database-tools

MCP server providing SQL and database tools for AI agents. All analysis is performed on SQL text โ€” no actual database connection required.

Tools

sql_format

Format and prettify SQL queries with proper indentation, uppercased keywords, and aligned columns. Supports MySQL, PostgreSQL, and SQLite syntax.

sql_explain

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.

schema_analyze

Parse CREATE TABLE statements to extract tables, columns, types, constraints, foreign keys, and indexes. Generates an ER diagram in Mermaid format.

query_build

Build SQL queries from natural language descriptions. Supports common patterns like filtering by date, aggregation, joins, ordering, and pagination.

migration_generate

Compare two schemas (old vs new CREATE TABLE statements) and generate ALTER TABLE migration statements. Produces both up (forward) and down (rollback) migrations.

Installation

npm install
npm run build

Usage

With Claude Desktop

Add to your Claude Desktop config (claude_desktop_config.json):

{
  "mcpServers": {
    "database-tools": {
      "command": "node",
      "args": ["path/to/mcp-database-tools/dist/index.js"]
    }
  }
}

Standalone

npm start

Development

npm run build    # Compile TypeScript
npm start        # Run the server

License

MIT

MCP Server ยท Populars

MCP Server ยท New

    globau

    Firefox DevTools MCP

    Model Context Protocol server for Firefox DevTools - enables AI assistants to inspect and control Firefox browser through the Remote Debugging Protocol

    Community globau
    nukeop

    nuclear

    Streaming music player that finds free music for you

    Community nukeop
    qualixar

    SuperLocalMemory V3

    World's first local-only AI memory to break 74% retrieval and 60% zero-LLM on LoCoMo. No cloud, no APIs, no data leaves your machine. Additionally, mode C (LLM/Cloud) - 87.7% LoCoMo. Research-backed. arXiv: 2603.14588

    Community qualixar
    proxy-intell

    Facebook Ads Library MCP Server

    MCP Server for Facebook ADs Library - Get instant answers from FB's ad library

    Community proxy-intell
    genkit-ai

    Genkit MCP

    Open-source framework for building AI-powered apps in JavaScript, Go, and Python, built and used in production by Google

    Community genkit-ai