← Back to directory
D

DBHub

Official
Bytebase's official, minimalist two-tool database MCP server
GitHub source repository ↗
★ 3.2k Stars Category · Database Very popular
74FMRS · B
Source and config reviewed
Reliability
13/20
Security and permissions
13/20
Maintenance
16/20
Documentation
15/20
Setup experience
17/20

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.

Read the scoring and verification method →
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.

Tools

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

Setup

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"
      }
    }
  }
}

Fit and risk

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

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)

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 DesktopFull support
Claude CodeFull support
VS CodeFull support
CursorFull support
ZedFull support