← Back to directory
D

DBHub

Official
Bytebase's official, minimalist two-tool database MCP server
Category
Database #3 of 58
Stars
★ 3.7k Very popular
Transport
stdio (local process) · Streamable HTTP
Runtime
Node.js 22.5.0+ · Docker
Credentials
No credential needed
License
MIT
Last commit
Tools
2
74FMRS · B

Officially maintained by Bytebase; the tool count is kept deliberately minimal at two, and the MCP Bundle's read-only default is friendly to non-technical users. The core risk is that execute_sql can run arbitrary SQL by default — pair it with a read-only account or guardrail flags. This review is a static check of source and docs, not an actual database connection test.

Strongest · Setup experience 17/20 Weakest · Reliability 13/20

Reliability
13/20
Security and permissions
13/20
Maintenance
16/20
Documentation
15/20
Setup experience
17/20

Test out of dateListed 2026-07-24

Read the FMRS scoring method →

Fit and risk

What it can accessUses the networkConnects to a database

Best for

  • Scenarios wanting the smallest possible tool count and lowest context-window overhead for database access
  • Cases needing to grant non-technical teammates safe, read-only database access

Not for

  • Scenarios needing database administration operations (creating indexes, altering schema) rather than just querying (DBHub is positioned as a query tool, not a DBA management tool)

Required permissions

  • Requires a database connection string (DSN), which may contain sensitive credentials
  • execute_sql can run arbitrary SQL (including writes) by default — must be constrained via read-only mode or the underlying database account's own permissions

Risks and side effects

  • Under default settings, if the connected database account has write access, execute_sql could let the assistant perform an unintended write or delete — pair with a read-only database account in production
  • The DSN contains a plaintext password — pay attention to the access permissions on wherever the config is stored

Setup

Before you start

Runtime:Node.js 22.5.0+ · Docker

DSN optionalsecret Database connection string (e.g., postgres://user:pass@host:5432/db), from your own database.
DB_PASSWORD optionalsecret Database password, from your own database.
SSH_PASSWORD optionalsecret SSH password, from your SSH server.
SSH_PASSPHRASE optionalsecret SSH key passphrase.
Other optional settings (12)
DB_TYPE optional Database type: postgres, mysql, mariadb, sqlserver, oracle, or sqlite.
DB_HOST optional Database hostname.
DB_PORT optional Database port.
DB_USER optional Database username.
DB_NAME optional Database name or SQLite file path.
TRANSPORT optional Transport mode: stdio or http.
PORT optional HTTP server port (default: 8080).
ID optional Instance identifier used for tool names.
SSH_HOST optional SSH tunnel server hostname.
SSH_PORT optional SSH server port (default: 22).
SSH_USER optional SSH username.
SSH_KEY optional Path to SSH private key.

1) Run directly via NPM: npx @bytebase/dbhub@latest --transport stdio --dsn "postgres://user:pass@host:5432/db" (Node.js ≥ 22.5.0).
2) One-click bundle: download the .mcpb file from the GitHub release and drag it into an MCPB-compatible client like Claude Desktop — it runs locally over stdio and is read-only by default, good for non-technical teammates.
3) Claude Code users can register it with one command via the official plugin, which prompts interactively for the connection string.

claude_desktop_config.json
{
  "mcpServers": {
    "dbhub": {
      "command": "npx",
      "args": ["-y", "@bytebase/dbhub", "--transport", "stdio"],
      "env": {
        "DSN": "postgres://user:password@localhost:5432/dbname?sslmode=disable"
      }
    }
  }
}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "dbhub": {
      "command": "npx",
      "args": [
        "-y",
        "@bytebase/dbhub",
        "--transport",
        "stdio"
      ],
      "env": {
        "DSN": "postgres://user:password@localhost:5432/dbname?sslmode=disable"
      }
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add dbhub -e 'DSN=postgres://user:password@localhost:5432/dbname?sslmode=disable' -- npx -y @bytebase/dbhub --transport stdio

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

The client's tool list should show execute_sql and search_objects; ask the AI to run search_objects for table names — if it returns schema results, the connection works.

Troubleshooting

  1. Connection fails: check that the DSN format and sslmode parameter match the database's actual configuration
  2. Query times out: check whether the built-in query timeout guardrail was hit, which may point to an inefficient query
  3. MCP Bundle won't install: confirm the client supports the MCPB format (modelcontextprotocol/mcpb)

Things to try

Once connected, you can ask your AI assistant things like:

  • List all tables in my PostgreSQL database
  • Show the columns and indexes of the users table
  • Search the database for tables and procedures related to orders
  • Count how many rows are in the orders table

Tools 2

execute_sql writes
Execute SQL queries with transaction support and safety controls
search_objects read-only
Search and explore database schemas, tables, columns, indexes, and procedures

Use cases

Let an AI assistant query a business database directly to answer questions without hand-writing SQL
Give non-technical teammates safe, read-only database access via the MCP Bundle
Explore an unfamiliar database's tables, indexes, and columns
Connect to multiple different database types at once through a single query interface

Supported clients

Claude Desktop
Claude Code
VS Code
Cursor
Zed

Listed from the project's documentation, not tested by this site.

Overview

Officially maintained by Bytebase, the open-source database DevSecOps platform, this MCP server is built around a deliberately minimal design — "zero dependency, just two tools" — to save context window: one for executing SQL (with transaction support and safety controls), one for searching and exploring database schema. It supports PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite, can connect to multiple databases at once via TOML config, and offers read-only mode, row limiting, and query timeout guardrails.

Similar servers

Source revision 2dbf01af53e3 Data synced 2026-10-19 Read the FMRS scoring method