D

Dbmcp

by haymon.ai · ai.haymon/dbmcp

Database MCP server for MySQL, MariaDB, PostgreSQL & SQLite

oci Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "ai-haymon-dbmcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "-e",
        "DB_SSL=<YOUR_VALUE>",
        "-e",
        "DB_HOST=<YOUR_VALUE>",
        "-e",
        "DB_NAME=<YOUR_VALUE>",
        "-e",
        "DB_PORT=<YOUR_VALUE>",
        "-e",
        "DB_USER=<YOUR_VALUE>",
        "-e",
        "DB_SSL_CA=<YOUR_VALUE>",
        "-e",
        "LOG_LEVEL=<YOUR_VALUE>",
        "-e",
        "DB_BACKEND=<YOUR_VALUE>",
        "-e",
        "DB_CHARSET=<YOUR_VALUE>",
        "-e",
        "DB_SSL_KEY=<YOUR_VALUE>",
        "-e",
        "DB_PASSWORD=<YOUR_VALUE>",
        "-e",
        "DB_SSL_CERT=<YOUR_VALUE>",
        "-e",
        "MCP_READ_ONLY=<YOUR_VALUE>",
        "-e",
        "MCP_MAX_POOL_SIZE=<YOUR_VALUE>",
        "-e",
        "DB_SSL_VERIFY_CERT=<YOUR_VALUE>",
        "ghcr.io/haymon-ai/dbmcp:0.21.0"
      ]
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "ai-haymon-dbmcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "-e",
        "DB_SSL=<YOUR_VALUE>",
        "-e",
        "DB_HOST=<YOUR_VALUE>",
        "-e",
        "DB_NAME=<YOUR_VALUE>",
        "-e",
        "DB_PORT=<YOUR_VALUE>",
        "-e",
        "DB_USER=<YOUR_VALUE>",
        "-e",
        "DB_SSL_CA=<YOUR_VALUE>",
        "-e",
        "LOG_LEVEL=<YOUR_VALUE>",
        "-e",
        "DB_BACKEND=<YOUR_VALUE>",
        "-e",
        "DB_CHARSET=<YOUR_VALUE>",
        "-e",
        "DB_SSL_KEY=<YOUR_VALUE>",
        "-e",
        "DB_PASSWORD=<YOUR_VALUE>",
        "-e",
        "DB_SSL_CERT=<YOUR_VALUE>",
        "-e",
        "MCP_READ_ONLY=<YOUR_VALUE>",
        "-e",
        "MCP_MAX_POOL_SIZE=<YOUR_VALUE>",
        "-e",
        "DB_SSL_VERIFY_CERT=<YOUR_VALUE>",
        "ghcr.io/haymon-ai/dbmcp:0.21.0"
      ]
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "ai-haymon-dbmcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "-e",
        "DB_SSL=<YOUR_VALUE>",
        "-e",
        "DB_HOST=<YOUR_VALUE>",
        "-e",
        "DB_NAME=<YOUR_VALUE>",
        "-e",
        "DB_PORT=<YOUR_VALUE>",
        "-e",
        "DB_USER=<YOUR_VALUE>",
        "-e",
        "DB_SSL_CA=<YOUR_VALUE>",
        "-e",
        "LOG_LEVEL=<YOUR_VALUE>",
        "-e",
        "DB_BACKEND=<YOUR_VALUE>",
        "-e",
        "DB_CHARSET=<YOUR_VALUE>",
        "-e",
        "DB_SSL_KEY=<YOUR_VALUE>",
        "-e",
        "DB_PASSWORD=<YOUR_VALUE>",
        "-e",
        "DB_SSL_CERT=<YOUR_VALUE>",
        "-e",
        "MCP_READ_ONLY=<YOUR_VALUE>",
        "-e",
        "MCP_MAX_POOL_SIZE=<YOUR_VALUE>",
        "-e",
        "DB_SSL_VERIFY_CERT=<YOUR_VALUE>",
        "ghcr.io/haymon-ai/dbmcp:0.21.0"
      ]
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "ai-haymon-dbmcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "-e",
        "DB_SSL=<YOUR_VALUE>",
        "-e",
        "DB_HOST=<YOUR_VALUE>",
        "-e",
        "DB_NAME=<YOUR_VALUE>",
        "-e",
        "DB_PORT=<YOUR_VALUE>",
        "-e",
        "DB_USER=<YOUR_VALUE>",
        "-e",
        "DB_SSL_CA=<YOUR_VALUE>",
        "-e",
        "LOG_LEVEL=<YOUR_VALUE>",
        "-e",
        "DB_BACKEND=<YOUR_VALUE>",
        "-e",
        "DB_CHARSET=<YOUR_VALUE>",
        "-e",
        "DB_SSL_KEY=<YOUR_VALUE>",
        "-e",
        "DB_PASSWORD=<YOUR_VALUE>",
        "-e",
        "DB_SSL_CERT=<YOUR_VALUE>",
        "-e",
        "MCP_READ_ONLY=<YOUR_VALUE>",
        "-e",
        "MCP_MAX_POOL_SIZE=<YOUR_VALUE>",
        "-e",
        "DB_SSL_VERIFY_CERT=<YOUR_VALUE>",
        "ghcr.io/haymon-ai/dbmcp:0.21.0"
      ]
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "ai-haymon-dbmcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "-e",
        "DB_SSL=<YOUR_VALUE>",
        "-e",
        "DB_HOST=<YOUR_VALUE>",
        "-e",
        "DB_NAME=<YOUR_VALUE>",
        "-e",
        "DB_PORT=<YOUR_VALUE>",
        "-e",
        "DB_USER=<YOUR_VALUE>",
        "-e",
        "DB_SSL_CA=<YOUR_VALUE>",
        "-e",
        "LOG_LEVEL=<YOUR_VALUE>",
        "-e",
        "DB_BACKEND=<YOUR_VALUE>",
        "-e",
        "DB_CHARSET=<YOUR_VALUE>",
        "-e",
        "DB_SSL_KEY=<YOUR_VALUE>",
        "-e",
        "DB_PASSWORD=<YOUR_VALUE>",
        "-e",
        "DB_SSL_CERT=<YOUR_VALUE>",
        "-e",
        "MCP_READ_ONLY=<YOUR_VALUE>",
        "-e",
        "MCP_MAX_POOL_SIZE=<YOUR_VALUE>",
        "-e",
        "DB_SSL_VERIFY_CERT=<YOUR_VALUE>",
        "ghcr.io/haymon-ai/dbmcp:0.21.0"
      ]
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "ai-haymon-dbmcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "-e",
        "DB_SSL=<YOUR_VALUE>",
        "-e",
        "DB_HOST=<YOUR_VALUE>",
        "-e",
        "DB_NAME=<YOUR_VALUE>",
        "-e",
        "DB_PORT=<YOUR_VALUE>",
        "-e",
        "DB_USER=<YOUR_VALUE>",
        "-e",
        "DB_SSL_CA=<YOUR_VALUE>",
        "-e",
        "LOG_LEVEL=<YOUR_VALUE>",
        "-e",
        "DB_BACKEND=<YOUR_VALUE>",
        "-e",
        "DB_CHARSET=<YOUR_VALUE>",
        "-e",
        "DB_SSL_KEY=<YOUR_VALUE>",
        "-e",
        "DB_PASSWORD=<YOUR_VALUE>",
        "-e",
        "DB_SSL_CERT=<YOUR_VALUE>",
        "-e",
        "MCP_READ_ONLY=<YOUR_VALUE>",
        "-e",
        "MCP_MAX_POOL_SIZE=<YOUR_VALUE>",
        "-e",
        "DB_SSL_VERIFY_CERT=<YOUR_VALUE>",
        "ghcr.io/haymon-ai/dbmcp:0.21.0"
      ]
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
DB_SSL No Enable SSL Default: false
DB_HOST No Database host Default: localhost
DB_NAME No Database name or SQLite file path
DB_PORT No Database port (default: 3306 for MySQL/MariaDB, 5432 for PostgreSQL)
DB_USER No Database user (default: root for MySQL/MariaDB, postgres for PostgreSQL)
DB_SSL_CA No CA certificate path
LOG_LEVEL No Log level (trace/debug/info/warn/error) Default: info
DB_BACKEND Yes Database backend: mysql, mariadb, postgres, or sqlite (required)
DB_CHARSET No Character set (MySQL/MariaDB only)
DB_SSL_KEY No Client key path
DB_PASSWORD No Database password
DB_SSL_CERT No Client certificate path
MCP_READ_ONLY No Block write queries Default: true
MCP_MAX_POOL_SIZE No Max connection pool size (min: 1) Default: 10
DB_SSL_VERIFY_CERT No Verify server certificate Default: true

Similar servers