Skip to content
Grok

DB MCP Server for Grok

io.github.stucchi/db

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

client:Grok transport:stdio runtime:pypi

Install DB MCP Server in Grok

.mcp.json (in your project root)

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

{
  "mcpServers": {
    "db": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "db-mcp-server"
      ],
      "env": {
        "DB_TYPE": "<DB_TYPE>",
        "DB_DATABASE": "<DB_DATABASE>",
        "DB_MODE": "<DB_MODE>",
        "DB_HOST": "<DB_HOST>",
        "DB_PORT": "<DB_PORT>",
        "DB_USER": "<DB_USER>",
        "DB_PASSWORD": "<DB_PASSWORD>",
        "DB_URL": "<DB_URL>",
        "SSH_HOST": "<SSH_HOST>",
        "SSH_PORT": "<SSH_PORT>",
        "SSH_USER": "<SSH_USER>",
        "SSH_KEY": "<SSH_KEY>",
        "SSH_PASSWORD": "<SSH_PASSWORD>"
      }
    }
  }
}

Grok Build reads Claude Code's .mcp.json and Claude Desktop's config unchanged, so a server you have already set up there needs nothing new. The Grok web app and X integration do not take custom servers. Grok docs

DB MCP Server in other clients