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,721 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)
Data as of from the GitHub API and the official MCP registry; description from the project's repository. Report an error
Install DBHub
Generated from the server's MCP registry entry. Replace your-value with your own values.
Claude Desktop
{
"mcpServers": {
"dbhub": {
"command": "npx",
"args": [
"-y",
"@bytebase/dbhub"
],
"env": {
"DSN": "your-value",
"DB_PASSWORD": "your-value",
"SSH_PASSWORD": "your-value",
"SSH_PASSPHRASE": "your-value",
"SSH_AUTH_SOCK": "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 --env SSH_AUTH_SOCK=your-value --transport stdio dbhub -- npx -y @bytebase/dbhubCursor
{
"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",
"SSH_AUTH_SOCK": "your-value"
}
}
}
}Project file; use ~/.cursor/mcp.json to enable it in every project.
VS Code
{
"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
},
{
"type": "promptString",
"id": "ssh_auth_sock",
"description": "SSH_AUTH_SOCK",
"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}",
"SSH_AUTH_SOCK": "${input:ssh_auth_sock}"
}
}
}
}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.
| Name | Required | Description |
|---|---|---|
DSNsecret | No | Database connection string (e.g., postgres://user:pass@host:5432/db) |
DB_TYPE | No | Database type: postgres, mysql, mariadb, sqlserver, oracle, sqlite |
DB_HOST | No | Database hostname |
DB_PORT | No | Database port |
DB_USER | No | Database username |
DB_PASSWORDsecret | No | Database password |
DB_NAME | No | Database name or SQLite file path |
TRANSPORT | No | Transport mode: stdio or http |
PORT | No | HTTP server port (default: 8080) |
ID | No | Instance identifier for tool names |
SSH_HOST | No | SSH server hostname |
SSH_PORT | No | SSH server port (default: 22) |
SSH_USER | No | SSH username |
SSH_PASSWORDsecret | No | SSH password |
SSH_KEY | No | Path to SSH private key |
SSH_PASSPHRASEsecret | No | SSH key passphrase |
SSH_AUTH_SOCKsecret | No | Path to SSH agent socket |
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
Similar MCP servers
More databases MCP servers
Dbx
t8y2/dbx
Query databases from AI agents using connections configured in DBX.
Active · last commit Oct 26, 2026
DatabasesRustLINQ to DB
linq2db/linq2db
Inspect database schemas and execute SQL queries across multiple database providers with LINQ to DB.
Active · last commit Oct 25, 2026
DatabasesC#Aiven MCP
Aiven-Open/mcp-aiven
Provision PostgreSQL, manage Apache Kafka, and deploy apps with Aiven - all from your AI assistant.
Active · last commit Oct 20, 2026
OfficialDatabasesTypeScriptButterbase AI MCP Server
butterbase-ai/butterbase
Butterbase MCP server — manage your backend: schemas, auth, functions, storage, RAG, deploys.
Maintained · last commit Oct 26, 2026
DatabasesTypeScriptOpenDeviceDB
opendevicedb/opendevicedb
Check 21,000+ devices with open firmware or protocols before reverse engineering one.
Too new to judge · created Oct 17, 2026
OfficialDatabasesTypeScriptSupabase
supabase/mcp
MCP server for interacting with the Supabase platform.
Active · last commit Oct 24, 2026
OfficialDatabasesTypeScript
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, SSH_PASSPHRASE and SSH_AUTH_SOCK) for the service it connects to, which may require a paid account.
Is DBHub actively maintained?
The most recent commit was on Oct 21, 2026. The latest release is v1.5.0, published Oct 9, 2026. appsgit only lists MCP servers with a commit in the last six months.