# mcp-database

Source: https://glimind.com/server/pypi%2Fmcp-database
Registry id: `pypi/mcp-database`
Status: unknown

## Install

```json
{
  "mcpServers": {
    "mcp-database": {
      "command": "uvx",
      "args": [
        "mcp-database"
      ]
    }
  }
}
```

Claude Code:

```sh
claude mcp add mcp-database -- uvx mcp-database
```

## Tools (13)

- `check_health`: Get database health metrics (table count, row counts, latency)
- `diagnose_connection`: Diagnose connection issues with troubleshooting hints
- `execute`: Execute a write statement (INSERT, UPDATE, DELETE) — opt-in only
- `explain_query`: Explain the execution plan for a SELECT query
- `generate_er_diagram`: Generate Mermaid ER diagram from database schema
- `get_schema`: Get full database schema (CREATE TABLE statements)
- `get_table_info`: Get detailed table info (columns, types, row count)
- `list_databases`: List all configured database connections
- `list_tables`: List all tables in a database
- `query`: Execute a read-only SQL query (SELECT, SHOW, DESCRIBE)
- `sample_rows`: Get sample rows from a table
- `schema_diff`: Compare schemas between two database connections
- `search_tables`: Search for tables or columns by keyword

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