← Index

DB MCP Server

io.github.stucchi/db·v1.2.1·Databases
Quality Score
94
/100

Database MCP server for MySQL, PostgreSQL, MongoDB, and SQLite with SSH tunneling support.

§01  Install
Claude Desktop (uvx)
{
  "mcpServers": {
    "db": {
      "command": "uvx",
      "args": [
        "db-mcp-server"
      ],
      "env": {
        "DB_TYPE": "<db_type>",
        "DB_DATABASE": "<db_database>",
        "DB_MODE": "read-only",
        "DB_HOST": "localhost",
        "DB_PORT": "<db_port>",
        "DB_USER": "<db_user>",
        "DB_PASSWORD": "<your-db_password>",
        "DB_URL": "<your-db_url>",
        "SSH_HOST": "<ssh_host>",
        "SSH_PORT": "22",
        "SSH_USER": "<ssh_user>",
        "SSH_KEY": "<ssh_key>",
        "SSH_PASSWORD": "<your-ssh_password>"
      }
    }
  }
}
§02  Environment variables
DB_TYPE
required

Database type

DB_DATABASE
required

Database name

DB_MODE

Access mode

DB_HOST

Database host (MySQL/PostgreSQL)

DB_PORT

Database port (MySQL: 3306, PostgreSQL: 5432)

DB_USER

Database user (MySQL default: root, PostgreSQL default: postgres)

DB_PASSWORD
secret

Database password (MySQL/PostgreSQL, optional)

DB_URL
secret

MongoDB connection URL (required for MongoDB, e.g. mongodb://...)

SSH_HOST

SSH bastion host for tunneling (MySQL/PostgreSQL only)

SSH_PORT

SSH port

SSH_USER

SSH username (default: current OS user)

SSH_KEY

Path to SSH private key (e.g. ~/.ssh/id_rsa)

SSH_PASSWORD
secret

SSH password (if no key provided)

§03  MCP Quality Score  ·  methodology
freshness
24
completeness
20
installability
25
documentation
15
stability
10
§04  Alternatives in Databases