io.github.rog0x/database

Official registry Data and databases

SQL formatting, schema visualization, migration generation

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package @rog0x/mcp-database-tools
Claude Code
claude mcp add database -- npx -y @rog0x/mcp-database-tools@1.0.1
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "database": {
            "command": "npx",
            "args": [
                "-y",
                "@rog0x/mcp-database-tools@1.0.1"
            ]
        }
    }
}

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. mcp-database-tools
  2. Tools
  3. Installation
  4. Usage
  5. Development
  6. License

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

Frequently asked questions

What is io.github.rog0x/database?

SQL formatting, schema visualization, migration generation

How do I install io.github.rog0x/database?

It runs on your machine. In Claude Code: claude mcp add database -- npx -y @rog0x/mcp-database-tools@1.0.1. For other clients, paste the JSON configuration from this page into their MCP settings.

Does io.github.rog0x/database need an API key?

Its registry entry lists no required key or secret. Some features may still need an account with the service it connects to.

Is io.github.rog0x/database open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains io.github.rog0x/database?

It is published by rog0x. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.