MCP server: One MCP server.

Database

@rog0xMCP server · External

SQL formatting, schema visualization, migration generation

Databasesv1.0.1MITTypeScript
Freeno charge per call

Runs on your machine from its package; the steps are below.

What it does

  1. Reads
  2. Writes
  3. High impact

At most: creates or changes data: records, files, settings.

What it costs

Free

Odel charges nothing per call. The publisher may charge for its own service.

Runs locally over stdio

This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).

npm@rog0x/mcp-database-toolsv1.0.1

Run

npx -y @rog0x/mcp-database-tools

MCP client config

{
  "mcpServers": {
    "database": {
      "command": "npx",
      "args": [
        "-y",
        "@rog0x/mcp-database-tools"
      ]
    }
  }
}
README1 min read

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

bash
npm install
npm run build

Usage

With Claude Desktop

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

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

Standalone

bash
npm start

Development

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

License

MIT

Similar modules

Browse Databases