Skip to content
appsgit

DBHub

DBHub is an MCP server that adds database tools to AI assistants such as Claude Desktop, Claude Code and Cursor. Token-efficient database MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite. It has 3,610 GitHub stars, is released under the MIT license and runs locally with npx -y @bytebase/dbhub.

github.com/bytebase/dbhub (opens in a new tab)

Install DBHub

Generated from the server's MCP registry entry. Replace your-value with your own values.

Claude Desktop

claude_desktop_config.json
{
  "mcpServers": {
    "dbhub": {
      "command": "npx",
      "args": [
        "-y",
        "@bytebase/dbhub"
      ],
      "env": {
        "DSN": "your-value",
        "DB_PASSWORD": "your-value",
        "SSH_PASSWORD": "your-value",
        "SSH_PASSPHRASE": "your-value"
      }
    }
  }
}

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

Claude Code

claude mcp add --env DSN=your-value --env DB_PASSWORD=your-value --env SSH_PASSWORD=your-value --env SSH_PASSPHRASE=your-value --transport stdio dbhub -- npx -y @bytebase/dbhub

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "dbhub": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@bytebase/dbhub"
      ],
      "env": {
        "DSN": "your-value",
        "DB_PASSWORD": "your-value",
        "SSH_PASSWORD": "your-value",
        "SSH_PASSPHRASE": "your-value"
      }
    }
  }
}

Project file; use ~/.cursor/mcp.json to enable it in every project.

VS Code

.vscode/mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "dsn",
      "description": "DSN",
      "password": true
    },
    {
      "type": "promptString",
      "id": "db_password",
      "description": "DB_PASSWORD",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ssh_password",
      "description": "SSH_PASSWORD",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ssh_passphrase",
      "description": "SSH_PASSPHRASE",
      "password": true
    }
  ],
  "servers": {
    "dbhub": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@bytebase/dbhub"
      ],
      "env": {
        "DSN": "${input:dsn}",
        "DB_PASSWORD": "${input:db_password}",
        "SSH_PASSWORD": "${input:ssh_password}",
        "SSH_PASSPHRASE": "${input:ssh_passphrase}"
      }
    }
  }
}

Config formats checked against the official docs on Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).

Environment variables

Variables the server reads at startup.

NameRequiredDescription
DSNsecretNoDatabase connection string (e.g., postgres://user:pass@host:5432/db)
DB_TYPENoDatabase type: postgres, mysql, mariadb, sqlserver, oracle, sqlite
DB_HOSTNoDatabase hostname
DB_PORTNoDatabase port
DB_USERNoDatabase username
DB_PASSWORDsecretNoDatabase password
DB_NAMENoDatabase name or SQLite file path
TRANSPORTNoTransport mode: stdio or http
PORTNoHTTP server port (default: 8080)
IDNoInstance identifier for tool names
SSH_HOSTNoSSH server hostname
SSH_PORTNoSSH server port (default: 22)
SSH_USERNoSSH username
SSH_PASSWORDsecretNoSSH password
SSH_KEYNoPath to SSH private key
SSH_PASSPHRASEsecretNoSSH key passphrase

About DBHub

DBHub is a minimal MCP server: token-efficient, zero-dependency, and just two tools by default with opt-in extras. This lightweight gateway allows MCP-compatible clients to connect to and explore different databases:

  • ai
  • anthropic
  • claude
  • database
  • mcp
  • mcp-server
  • claude-ai
  • mysql
  • postgres
  • sqlserver

FAQ

DBHub FAQ

Still curious? Email info@appsgit.com.

What is DBHub?

DBHub is an MCP server that adds database tools to AI assistants such as Claude Desktop, Claude Code and Cursor. Token-efficient database MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite. It has 3,610 GitHub stars, is released under the MIT license and runs locally with npx -y @bytebase/dbhub. The source code is at github.com/bytebase/dbhub.

How do I install the DBHub MCP server?

Add the command npx -y @bytebase/dbhub to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.

Is DBHub free?

The server is open source under the MIT license, so running it is free. It needs credentials (DSN, DB_PASSWORD, SSH_PASSWORD and SSH_PASSPHRASE) for the service it connects to, which may require a paid account.

Is DBHub actively maintained?

The most recent commit was on Oct 2, 2026. The latest release is v1.4.0, published Sep 28, 2026. appsgit only lists MCP servers with a commit in the last six months and re-checks every server daily.