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.
- Needs API key
- Databases
- MIT
- Actively maintained
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"
}
}
}
}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/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"
}
}
}
}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
}
],
"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.
| 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 |
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.
DatabasesRustButterbase AI MCP Server
butterbase-ai/butterbase
Butterbase MCP server — manage your backend: schemas, auth, functions, storage, RAG, deploys.
DatabasesTypeScriptLINQ to DB
linq2db/linq2db
Inspect database schemas and execute SQL queries across multiple database providers with LINQ to DB.
DatabasesC#Mindwtr
dongdongbh/Mindwtr
Task automation via SQLite, desktop Local API, or Mindwtr Cloud; read-only by default.
DatabasesTypeScriptMCP Memory Service
doobidoo/mcp-memory-service
Open-source persistent memory for AI agent pipelines (LangGraph, CrewAI, AutoGen) and Claude.
DatabasesPythonPg Aiguide
timescale/pg-aiguide
Comprehensive PostgreSQL documentation and best practices, including ecosystem tools.
DatabasesPython
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.