DBHub Database MCP Gateway

Connect MCP clients to multiple SQL databases without crowding their context windows.

Source repo
bytebase/dbhub
Stars
★ 4k
Last updated
1d ago v2.1.0
FARS reviewed
Nov 08, 2026 +7 new
License
MIT
Primary language
TypeScript

At a glance

How it runs
CLISelf-hosted serviceMCP server
Works with
Universal · cross-platformClaude Code · Claude.ai
Cost
Free, no paid service needed
Setup effort
Low · running in minutes
You'll need
Node.js 22.5.0 or newer for developmentA supported PostgreSQL, MySQL, MariaDB, SQL Server, or SQLite databaseShell / CLINetwork accessLocal filesystemMCP Server
Typical use
A developer using Claude Code, VS Code, or Cursor explores schemas, validates queries, and debugs data during local development.
Not a fit if
  • Teams needing Oracle, MongoDB, or other unsupported databases
  • Users who want execution plans and health checks on by default
  • Developers on Node.js older than 22.5.0 building from source
Website
dbhub.ai ↗ set on GitHub
Maintenance
Commits in the last 30 dayslast commit 2026-12-02latest release v2.1.0 (2026-11-21)+7.1 ★/day over 7 days

What does this agent do, and when should you use it?

DBHub is a lightweight, self-hosted MCP server that presents one interface for PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite. MCP clients including Claude Code, Claude Desktop, Cursor, VS Code, and Copilot CLI can use it to connect to and explore databases. Its default surface contains only two tools, execute_sql and search_objects, which the documentation measures at about 1.4k tokens; explain_sql and health_check are optional. The server runs SQL, discovers database objects, and can expose parameterized custom SQL operations, returning results to the requesting MCP client. It can be launched through npx, Docker, or an MCP Bundle, while its built-in Workbench provides a web interface for queries, custom tools, and request traces.

An MCP client sends a database operation to DBHub, which connects to one or more configured databases. execute_sql runs SQL with transaction support and safety controls such as read-only mode, row limits, and query timeouts. search_objects progressively discovers schemas, tables, columns, indexes, and procedures. The optional explain_sql tool returns an execution plan without running the query, while health_check reports connection-pool state and buffer-cache hit ratio. Operators can define reusable parameterized SQL operations as Custom Tools in dbhub.toml and configure several database connections in the same file. Connections may use SSH tunneling and SSL/TLS, and the Workbench can execute queries, invoke custom tools, and display request traces.

  1. A developer using Claude Code, VS Code, or Cursor explores schemas, validates queries, and debugs data during local development.
  2. A database administrator exposes curated read-only views to non-technical staff who query them through Claude Desktop or another documented MCP client.
  3. A team operating PostgreSQL, MySQL, MariaDB, SQL Server, or SQLite replaces separate database-specific MCP servers with one DBHub process.
  4. An operations team performs production diagnostics with read-only access, row limits, and query timeouts to reduce runaway-query risk.
  5. A team with recurring controlled SQL workflows defines parameterized Custom Tools in dbhub.toml and invokes them from an MCP client or the Workbench.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • npx @bytebase/dbhub@latest --transport http --port 8080 --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"
Ports
8080 · 5432
Config files
dbhub.toml
Runtime
Node.js 22.5.0+
Install notes cover
Docker

How do you install or deploy this agent?

The quickest documented HTTP launch requires a reachable supported database and its DSN:

npx @bytebase/dbhub@latest --transport http --port 8080 --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"

Replace the sample username, password, host, port, and database name with valid connection details. A Docker image, a one-click read-only MCP Bundle, and a Claude Code plugin are also available. Source development requires Node.js >= 22.5.0:

pnpm install
pnpm dev

To build and start the production version over stdio:

pnpm build && pnpm start --transport stdio --dsn "postgres://user:password@localhost:5432/dbname"

How do you use this agent?

Start DBHub with a target database DSN, then connect a compatible MCP client to its stdio or HTTP transport. Use search_objects first to discover schemas, tables, columns, indexes, or procedures, and use execute_sql to run a query. For production or shared access, configure read-only mode, row limits, and query timeouts as appropriate. Put multiple connections and parameterized Custom Tools in dbhub.toml. Enable explain_sql when an execution plan is needed without running the query, or health_check for connection-pool and buffer-cache information. The built-in Workbench is an alternative interface for executing queries, invoking custom tools, and inspecting request traces.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

External MCP tool bridge

Inherits capabilities of connected MCP servers; audit third-party servers before enabling.

FARS trust-control audit

Not found in source — apply before daily use
  • confirmation before acting — Turn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.

What are this agent's strengths and limitations?

Pros
  • The default surface is limited to execute_sql and search_objects and is documented at about 1.4k tokens, preserving more client context than larger default tool catalogs.
  • One interface covers PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite, with TOML configuration for simultaneous connections.
  • Read-only mode, row limiting, and query timeouts provide concrete controls for database access.
  • SSH tunneling and SSL/TLS are supported, with delivery options including npx, Docker, an MCP Bundle, and a Claude Code plugin.
  • The built-in Workbench supports queries, custom-tool execution, and request-trace inspection without requiring an MCP client.
Limitations
  • Database coverage is limited to the five documented SQL systems; there is no evidence of support for Oracle, MongoDB, or other data platforms.
  • The intentionally small default tool set means execution plans and health reporting require opt-in tools.
  • Developing from source requires Node.js 22.5.0 or newer because DBHub uses the built-in node:sqlite module.
  • Operators must still provision and protect database credentials, network access, and any SSH or TLS configuration.
  • The source documents safety controls but does not state that read-only mode, row limits, and timeouts are enabled by default in every installation path, so production configuration must be reviewed.

How does this agent compare with similar options?

The README's default-configuration comparison reports DBHub at 2 tools and about 1.4k tokens, MCP Toolbox at 28 tools and 19.0k tokens, and Supabase MCP with all tools at 19.3k tokens. This evidence compares only default tool count and context usage; it does not establish broader superiority in database coverage, permissions, or total functionality.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
DBHub Database MCP Gateway This agent 69 · Some gaps CLIFree ★ 4k 1d ago TypeScript Claude Code · Claude.ai
WhoDB 54 · Major gaps Self-hosted serviceFreemium ★ 5.1k 1d ago Go —
Tabularis: Open-Source Desktop SQL Workspace 73 · Some gaps Desktop appFree + model costs ★ 5.6k today TypeScript ChatGPT · Codex · Claude Code · Claude.ai
Business Analytics Agent 61 · Some gaps Desktop appFree + model costs ★ 2.6k 5d ago JavaScript OpenAI API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
69/ 100 5-point scale 3.5 / 5
This review covers the source as of Nov 08, 2026. The project has shipped 7 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 13/29
Reliability 9/14
Adaptability 15/18
Convention 14/18
Effectiveness 13/13
Verifiability 5/8
Why each dimension lost points
Trust13 / 29 · 2.2/5

Code and docs show configurable read-only mode, row limits, timeouts, SSH, and TLS. HTTP authentication is unset by default and can be configured with bearer tokens; the supplied material shows no pre-write confirmation flow, so that criterion scores 0. Password redaction is mentioned, while DSN examples still place credentials on the command line; data-flow boundaries and secret handling are described but incomplete. Dependency ranges and graceful skipping of unavailable optional drivers are documented, but the packet provides no vulnerability audit or lockfile evidence. SQL affects databases, and the HTTP service, Workbench, and publishing workflows are visible external effects. Transaction support is mentioned, but general rollback guidance is absent. The marketplace names Bytebase and the repository is traceable, but the package author is blank and publisher identity is unverified, so attribution evidence is limited.

Reliability9 / 14 · 3.2/5

The README, installation docs, skills, and source broadly agree on default tools, supported databases, and read-only options; some packaging docs describe read-only behavior that depends on the selected configuration. Missing drivers skip their connector, and the Node version requirement is stated. The packet also describes connection and query timeouts and logging of pool background errors. Error messages appear actionable: DSN parsing errors redact passwords and show an expected format. Static evidence cannot establish runtime behavior.

Adaptability15 / 18 · 4.2/5

The packet explicitly covers local development, read-only access for nontechnical users, multi-database consolidation, and production diagnostics, and distinguishes stdio from HTTP use. Tool and skill documentation describes default and optional capabilities, read-only settings, and database-specific differences. Boundaries are not complete: HTTP authentication is off by default, and read-only behavior depends on configuration or packaging. Skill triggers fit database querying and schema exploration, though they broadly cover any database task.

Convention14 / 18 · 3.9/5

Documentation is organized across installation, quickstart, configuration, and tools, with examples for npm, Docker, client setup, and multi-database configuration. It explains Node requirements, optional drivers, and Docker host addressing. The MIT license is clear. The package version is 1.6.0 and CLAUDE.md describes version synchronization, but no changelog is supplied. Naming is mostly stable, though source IDs alter tool names. The package author is blank; responsibility can only be inferred from the Bytebase marketplace listing and repository address, and identity is unverified, so that score is low.

Effectiveness13 / 13 · 5.0/5

Two default tools and progressive schema exploration are designed to reduce context cost; the skill gives a concrete sequence from schema discovery through column inspection to querying. Multiple databases, optional diagnostics, and configurable custom tools broaden coverage. Quantified token-efficiency claims are project assertions not independently verified by this packet, but the fit between features and use cases is clear.

Verifiability5 / 8 · 3.1/5

Many feature claims trace to the README, installation docs, configuration examples, or source code; tool registration code supports the default-versus-optional tool distinction. Docs and code cross-check read-only policy, driver loading, and configuration, but the packet gives no test results for this revision or dependency audit. Explicit facts can be separated from project performance claims, which remain unverified assertions in the supplied material.

Risks and how to mitigate them
  • Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
  • HTTP mode has no authentication by default. Before exposing it on a reachable network, review the bind address, auth token, Host/Origin settings, and any proxy configuration.
  • SQL runs against the connected database. Read-only behavior depends on the active tool configuration or a specific read-only package; do not assume the Agent skill alone blocks writes.
  • The command-line DSN examples contain usernames and passwords. Use secret handling appropriate to the client and consider exposure through logs and process arguments.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision 0b2532b26da6 New commits since this review; the score may not cover them
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/dbhub.svg)](https://followagents.com/en/agents/dbhub)
<a href="https://followagents.com/en/agents/dbhub"><img src="https://followagents.com/badge/dbhub.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v2.1.0
    Release notes excerpt
    What's Changed * fix(postgres): preserve index key order and separate included columns by @tianzhou in https://github.com/bytebase/dbhub/pull/540 * feat(postgres): classify SQL with libpg-query by @tianzhou in https://github.com/bytebase/dbhub/pull/541 Full Changelog: https://github.com/bytebase/dbhub/compare/v2.0.2...v2.1.0
    View on GitHub ↗
  2. v2.0.2
    Release notes excerpt
    What's Changed * fix: cap the count of LIMIT offset, count instead of its offset by @tianzhou in https://github.com/bytebase/dbhub/pull/537 * fix(mysql): validate query timeout at connect, not per query by @tianzhou in https://github.com/bytebase/dbhub/pull/539 Full Changelog: https://github.com/bytebase/dbhub/compare/v2.0.1...v2.0.2
    View on GitHub ↗
  3. v2.0.1
    Release notes excerpt
    Full Changelog: https://github.com/bytebase/dbhub/compare/v2.0.0...v2.0.1
    View on GitHub ↗

FAQ

Does DBHub modify the database by default?
execute_sql can run SQL, so effective access depends on the database account and DBHub configuration. For read-only use, combine restricted database credentials with DBHub's read-only mode, row limits, and query timeout.
Can one DBHub instance connect to multiple databases?
Yes. Multiple database connections can be configured together in dbhub.toml, including connections to different supported database types.
Is Claude required?
No. DBHub exposes an MCP server, and the source explicitly lists Claude Desktop, Claude Code, Cursor, VS Code, and Copilot CLI as clients.
How can expensive or runaway queries be controlled?
DBHub provides row limits, query timeouts, and read-only mode. The optional explain_sql tool can inspect an execution plan without executing the query.
Does DBHub require a paid service?
The repository is MIT-licensed, and the supplied material does not document a required DBHub subscription. Operators still need to provide the runtime environment, database, and associated network resources.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts