# Rog0x Database MCP server

Source: https://glimind.com/server/mcp-registry%2Fio.github.rog0x%2Fdatabase
Registry id: `mcp-registry/io.github.rog0x/database`
Status: unknown

## Install

```json
{
  "mcpServers": {
    "rog0x-database-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@rog0x/mcp-database-tools"
      ]
    }
  }
}
```

Claude Code:

```sh
claude mcp add rog0x-database-mcp-server -- npx -y @rog0x/mcp-database-tools
```

## Tools (5)

- `migration_generate`: Compare two schemas (old vs new CREATE TABLE statements) and generate ALTER TABLE migration statements. Produces both up (forward) and down (rollback) migration
- `query_build`: Build SQL queries from natural language descriptions. Supports common patterns like filtering by date, aggregation, joins, ordering, and pagination.
- `schema_analyze`: Parse CREATE TABLE statements to extract tables, columns, types, constraints, foreign keys, and indexes. Generates an ER diagram in Mermaid format.
- `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.
- `sql_format`: Format and prettify SQL queries with proper indentation, uppercased keywords, and aligned columns. Supports MySQL, PostgreSQL, and SQLite syntax.

Measured by Glimind (https://glimind.com): MCP handshake + tool list only, no tool is ever called. CC BY 4.0.
