DBHub
Rank #49io.github.bytebase/dbhub
Token-efficient MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, ClickHouse, SQLite
What you can do with DBHub
DBHub is a zero-dependency MCP gateway from Bytebase that connects agents to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle and SQLite, with read-only mode, row limits and SSH/SSL access as guardrails.
- Run SQL, including multi-statement transactions
- Search schemas, tables, columns, indexes and procedures
- Show execution plans without running a query
- Report connection-pool state and buffer cache hit ratio
- Serve several databases from one TOML configuration
- Define reusable parameterised SQL as custom tools
What DBHub can and cannot do
execute_sql and search_objects load by default; explain_sql and health_check are opt-in per source in dbhub.toml, which can also define custom parameterised tools. Read-only mode combines a statement allow-list classifier with a BEGIN READ ONLY transaction on PostgreSQL.
- execute_sql
- search_objects
- explain_sql
- health_check
- Read-only mode is per-tool TOML configuration (readonly = true); the docs do not state it as the default for the CLI
- Privileged roles can still act through functions such as pg_read_file or COPY ... TO PROGRAM; use a least-privilege database user
- Approval flows, access control, data masking and audit logging are out of scope (offered by Bytebase instead)
- No query timeout setting is documented on the execute_sql page
- Node.js >= 22.5.0 is required for the npm install because it uses node:sqlite
What you need before using DBHub
The registry listing declares no required environment variables or authentication. This is declared metadata, not a verified install — the repository README is the authority.
Declared by mcp.so, last synced Nov 23, 2026. Not independently verified by MCP Toplist.
- Runtime
- Node.js >= 22.5.0 (npx @bytebase/dbhub) or Docker image bytebase/dbhub; MCP Bundle and Claude Code plugin also offered
- Credentials
- Database DSN via --dsn / DSN env var, DB_* variables, or a dbhub.toml for multiple connections
- Also needed
- Optional SSH tunnel (--ssh-*) and --auth-token bearer tokens for HTTP transport
- DSN · optional
- DB_TYPE · optional
- DB_HOST · optional
- DB_PORT · optional
- DB_USER · optional
- DB_PASSWORD · optional
- DB_NAME · optional
- TRANSPORT · optional
- PORT · optional
- ID · optional
- SSH_HOST · optional
- SSH_PORT · optional
- SSH_USER · optional
- SSH_PASSWORD · optional
- SSH_KEY · optional
- SSH_PASSPHRASE · optional
- SSH_AUTH_SOCK · optional
Connect DBHub and confirm it works
- Run npx @bytebase/dbhub@latest --dsn "postgres://user:password@host:5432/db" (stdio is the default transport)
- Or docker run bytebase/dbhub --transport http --port 8080 --dsn ... (use host.docker.internal for a database on the host)
- To restrict access, add a [[tools]] entry with name = "execute_sql", readonly = true and max_rows in dbhub.toml and start with --config
- Try --demo first for a bundled SQLite sample database
claude mcp add dbhub -e "DSN=<your DSN>" -e "DB_TYPE=<your DB_TYPE>" -e "DB_HOST=<your DB_HOST>" -e "DB_PORT=<your DB_PORT>" -e "DB_USER=<your DB_USER>" -e "DB_PASSWORD=<your DB_PASSWORD>" -e "DB_NAME=<your DB_NAME>" -e "TRANSPORT=<your TRANSPORT>" -e "PORT=<your PORT>" -e "ID=<your ID>" -e "SSH_HOST=<your SSH_HOST>" -e "SSH_PORT=<your SSH_PORT>" -e "SSH_USER=<your SSH_USER>" -e "SSH_PASSWORD=<your SSH_PASSWORD>" -e "SSH_KEY=<your SSH_KEY>" -e "SSH_PASSPHRASE=<your SSH_PASSPHRASE>" -e "SSH_AUTH_SOCK=<your SSH_AUTH_SOCK>" -- npx -y @bytebase/dbhubReplace each placeholder with your own value before saving.
[mcp_servers.dbhub]
command = "npx"
args = ["-y", "@bytebase/dbhub"]
[mcp_servers.dbhub.env]
DSN = "<your DSN>"
DB_TYPE = "<your DB_TYPE>"
DB_HOST = "<your DB_HOST>"
DB_PORT = "<your DB_PORT>"
DB_USER = "<your DB_USER>"
DB_PASSWORD = "<your DB_PASSWORD>"
DB_NAME = "<your DB_NAME>"
TRANSPORT = "<your TRANSPORT>"
PORT = "<your PORT>"
ID = "<your ID>"
SSH_HOST = "<your SSH_HOST>"
SSH_PORT = "<your SSH_PORT>"
SSH_USER = "<your SSH_USER>"
SSH_PASSWORD = "<your SSH_PASSWORD>"
SSH_KEY = "<your SSH_KEY>"
SSH_PASSPHRASE = "<your SSH_PASSPHRASE>"
SSH_AUTH_SOCK = "<your SSH_AUTH_SOCK>"Add to ~/.codex/config.toml. Replace each placeholder with your own value before saving.
{
"mcpServers": {
"dbhub": {
"command": "npx",
"args": [
"-y",
"@bytebase/dbhub"
],
"env": {
"DSN": "<your DSN>",
"DB_TYPE": "<your DB_TYPE>",
"DB_HOST": "<your DB_HOST>",
"DB_PORT": "<your DB_PORT>",
"DB_USER": "<your DB_USER>",
"DB_PASSWORD": "<your DB_PASSWORD>",
"DB_NAME": "<your DB_NAME>",
"TRANSPORT": "<your TRANSPORT>",
"PORT": "<your PORT>",
"ID": "<your ID>",
"SSH_HOST": "<your SSH_HOST>",
"SSH_PORT": "<your SSH_PORT>",
"SSH_USER": "<your SSH_USER>",
"SSH_PASSWORD": "<your SSH_PASSWORD>",
"SSH_KEY": "<your SSH_KEY>",
"SSH_PASSPHRASE": "<your SSH_PASSPHRASE>",
"SSH_AUTH_SOCK": "<your SSH_AUTH_SOCK>"
}
}
}
}Add to claude_desktop_config.json (Settings → Developer → Edit Config). Replace each placeholder with your own value before saving.
{
"mcpServers": {
"dbhub": {
"command": "npx",
"args": [
"-y",
"@bytebase/dbhub"
],
"env": {
"DSN": "<your DSN>",
"DB_TYPE": "<your DB_TYPE>",
"DB_HOST": "<your DB_HOST>",
"DB_PORT": "<your DB_PORT>",
"DB_USER": "<your DB_USER>",
"DB_PASSWORD": "<your DB_PASSWORD>",
"DB_NAME": "<your DB_NAME>",
"TRANSPORT": "<your TRANSPORT>",
"PORT": "<your PORT>",
"ID": "<your ID>",
"SSH_HOST": "<your SSH_HOST>",
"SSH_PORT": "<your SSH_PORT>",
"SSH_USER": "<your SSH_USER>",
"SSH_PASSWORD": "<your SSH_PASSWORD>",
"SSH_KEY": "<your SSH_KEY>",
"SSH_PASSPHRASE": "<your SSH_PASSPHRASE>",
"SSH_AUTH_SOCK": "<your SSH_AUTH_SOCK>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project). Replace each placeholder with your own value before saving.
{
"servers": {
"dbhub": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@bytebase/dbhub"
],
"env": {
"DSN": "<your DSN>",
"DB_TYPE": "<your DB_TYPE>",
"DB_HOST": "<your DB_HOST>",
"DB_PORT": "<your DB_PORT>",
"DB_USER": "<your DB_USER>",
"DB_PASSWORD": "<your DB_PASSWORD>",
"DB_NAME": "<your DB_NAME>",
"TRANSPORT": "<your TRANSPORT>",
"PORT": "<your PORT>",
"ID": "<your ID>",
"SSH_HOST": "<your SSH_HOST>",
"SSH_PORT": "<your SSH_PORT>",
"SSH_USER": "<your SSH_USER>",
"SSH_PASSWORD": "<your SSH_PASSWORD>",
"SSH_KEY": "<your SSH_KEY>",
"SSH_PASSPHRASE": "<your SSH_PASSPHRASE>",
"SSH_AUTH_SOCK": "<your SSH_AUTH_SOCK>"
}
}
}
}Save as .vscode/mcp.json in your workspace. Replace each placeholder with your own value before saving.
{
"mcpServers": {
"dbhub": {
"command": "npx",
"args": [
"-y",
"@bytebase/dbhub"
],
"env": {
"DSN": "<your DSN>",
"DB_TYPE": "<your DB_TYPE>",
"DB_HOST": "<your DB_HOST>",
"DB_PORT": "<your DB_PORT>",
"DB_USER": "<your DB_USER>",
"DB_PASSWORD": "<your DB_PASSWORD>",
"DB_NAME": "<your DB_NAME>",
"TRANSPORT": "<your TRANSPORT>",
"PORT": "<your PORT>",
"ID": "<your ID>",
"SSH_HOST": "<your SSH_HOST>",
"SSH_PORT": "<your SSH_PORT>",
"SSH_USER": "<your SSH_USER>",
"SSH_PASSWORD": "<your SSH_PASSWORD>",
"SSH_KEY": "<your SSH_KEY>",
"SSH_PASSPHRASE": "<your SSH_PASSPHRASE>",
"SSH_AUTH_SOCK": "<your SSH_AUTH_SOCK>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json. Replace each placeholder with your own value before saving.
{
"mcpServers": {
"dbhub": {
"command": "npx",
"args": [
"-y",
"@bytebase/dbhub"
],
"env": {
"DSN": "<your DSN>",
"DB_TYPE": "<your DB_TYPE>",
"DB_HOST": "<your DB_HOST>",
"DB_PORT": "<your DB_PORT>",
"DB_USER": "<your DB_USER>",
"DB_PASSWORD": "<your DB_PASSWORD>",
"DB_NAME": "<your DB_NAME>",
"TRANSPORT": "<your TRANSPORT>",
"PORT": "<your PORT>",
"ID": "<your ID>",
"SSH_HOST": "<your SSH_HOST>",
"SSH_PORT": "<your SSH_PORT>",
"SSH_USER": "<your SSH_USER>",
"SSH_PASSWORD": "<your SSH_PASSWORD>",
"SSH_KEY": "<your SSH_KEY>",
"SSH_PASSPHRASE": "<your SSH_PASSPHRASE>",
"SSH_AUTH_SOCK": "<your SSH_AUTH_SOCK>"
}
}
}
}Replace each placeholder with your own value before saving.
Ask the agent to "list the tables in this database" so it calls search_objects.
Expected: A list of schemas and tables from the connected database.
When to choose another server
- Postgres MCP#976
You only use PostgreSQL and want index tuning and deeper health checks.
- PostgreSQL#7,722
You want read-only by default out of the box with no TOML file.
- dbx#60
You already manage connections in the DBX desktop app and want to reuse them.
Compared side by side in PostgreSQL MCP servers.
What changed, and when this was checked
- First listed
- Mar 13, 2025
- Latest version published
- Nov 21, 2026
- Version history
- 26 versions tracked (below)
- Requirements evidence
- Declared by mcp.so, last synced Nov 23, 2026. Not independently verified by MCP Toplist.
- Profile checked
- Oct 9, 2026 against README, Docs: command line, Docs: execute_sql
- Ranking data as of
- Nov 24, 2026
- Official MCP ↗listed since Apr 25, 2026 · still listed
- PulseMCP ↗listed since Jun 4, 2026 · still listed
- mcp.so ↗listed since Jun 4, 2026 · still listed
- Glama ↗listed since Jun 4, 2026 · still listed
Do you maintain DBHub? to show as its verified maintainer and add your own summary, sign-in details and links. The rest of this page is read from the registry listings and from MCP Toplist's own connection check.
Available versions (26)
| Version | Published |
|---|---|
| 2.1.0 | Nov 21, 2026 |
| 2.0.2 | Nov 21, 2026 |
| 2.0.1 | Nov 20, 2026 |
| 2.0.0 | Nov 18, 2026 |
| 1.7.1 | Nov 17, 2026 |
| 1.7.0 | Nov 16, 2026 |
| 1.6.1 | Nov 11, 2026 |
| 1.6.0 | Nov 7, 2026 |
| 1.5.1 | Nov 3, 2026 |
| 1.5.0 | Oct 9, 2026 |
| 1.4.0 | Sep 28, 2026 |
| 1.3.1 | Sep 21, 2026 |
| 1.3.0 | Sep 19, 2026 |
| 1.2.5 | Sep 19, 2026 |
| 1.2.3 | Sep 2, 2026 |
| 1.2.2 | Sep 1, 2026 |
| 1.2.1 | Aug 21, 2026 |
| 1.2.0 | Jul 31, 2026 |
| 0.23.0 | Jul 10, 2026 |
| 0.22.4 | Jun 23, 2026 |
| 0.22.2 | Jun 7, 2026 |
| 0.21.1 | Apr 3, 2026 |
| 0.17.0 | Mar 7, 2026 |
| 0.13.2 | Dec 18, 2025 |
| 0.13.1 | Dec 17, 2025 |
| 0.1.0 | Nov 25, 2024 |
Ranks ahead of 188,676 of 188,725 servers on MCP Toplist.
Show your rank
Maintain this server? Add the live rank badge to your README — it updates automatically as the leaderboard changes.
[](https://mcptoplist.com/server/io.github.bytebase%2Fdbhub)<a href="https://mcptoplist.com/server/io.github.bytebase%2Fdbhub"><img src="https://mcptoplist.com/badge/io.github.bytebase%2Fdbhub.svg" alt="MCP Toplist: Top 1% of 188,725" /></a>Variants: append ?metric=score or ?metric=stars to the image URL.
Frequently asked questions
- Who maintains DBHub?
- DBHub is maintained by bytebase, which publishes 2 MCP servers (26 total versions) tracked on MCP Toplist.
- Is DBHub listed on the Official MCP Registry?
- Yes — DBHub is listed on the Official MCP Registry, alongside PulseMCP, mcp.so and Glama.
- How many versions does DBHub have?
- MCP Toplist tracks 26 versions of DBHub, most recently published on Nov 21, 2026.
- Where can I find the source code for DBHub?
- The source code for DBHub is hosted at github.com/bytebase/dbhub.
Do you run this server?
Community projects list the MCP servers behind real agents and apps. Publish yours and this page will link to it.