MCP Hub › Databases & Data › DB MCP Server

DB MCP Server MCP server

by stucchi · io.github.stucchi/db

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

🗄 Databases & DataPythonv1.2.1
Open in MCP HubGitHub repository ↗

How to install DB MCP Server

Python (uvx)

claude mcp add -e DB_TYPE=<your-db-type> -e DB_DATABASE=<your-db-database> db -- uvx db-mcp-server==1.2.1

Or add it to your MCP config (Claude Desktop, Cursor, VS Code):

{
  "mcpServers": {
    "db": {
      "command": "uvx",
      "args": [
        "db-mcp-server==1.2.1"
      ],
      "env": {
        "DB_TYPE": "<your-db-type>",
        "DB_DATABASE": "<your-db-database>"
      }
    }
  }
}

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 – Database password (MySQL/PostgreSQL, optional)
DB_URL – 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 – SSH password (if no key provided)

Replace placeholders in <angle brackets> with your own values. Review what a server can access before you enable it.

Details

Version
1.2.1
Published
2026-03-24
Updated
2026-03-24
Namespace
io.github.stucchi
Source
stucchi/db-mcp-server

Similar databases & data servers