Dbhub logo

Dbhub

Connect MCP clients to multiple SQL databases through a lightweight gateway with query, schema search, and optional diagnostic tools.

Install Dbhub

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "dbhub": {
      "command": "npx",
      "args": [
        "-y",
        "@bytebase/dbhub@latest"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

dbhub is an MCP server that connects compatible AI clients to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, and SQLite. It provides two default tools for executing SQL and exploring database objects, with optional query-plan, health-check, and custom SQL tools. TOML configuration supports multiple simultaneous database connections, while read-only mode, row limits, query timeouts, SSH tunneling, and SSL/TLS address common operational needs. Reach for dbhub when you want one lightweight interface for development, schema exploration, read-only troubleshooting, or controlled access to several databases.

Use cases

  • Explore schemas during local development
  • Validate queries and debug database data
  • Consolidate access to multiple databases
  • Troubleshoot production systems in read-only mode
  • Expose curated read-only views to non-technical users

Key features

  • Connects to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, and SQLite
  • Executes SQL with transactions and safety controls
  • Searches schemas, tables, columns, indexes, and procedures
  • Supports TOML-based multi-database configuration
  • Provides read-only mode, row limits, and query timeouts
  • Includes optional query-plan, health-check, and custom-tool support

Tools1

What Dbhub lets your agent do. Expand a tool for its parameters.

Self-reported~3 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

41/41 checks healthy over the last 58d

Supply-chain signal

2 high-severity advisories on record for this package. Most advisories affect transitive dependencies and may not be exploitable in this server's actual usage — this is a directional signal, not a security audit.

Critical 1High 1Medium 1Low 0

Scanned 5h ago via OSV.dev · @bytebase/dbhub@latest (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars3.8kStargazers on the source repository.
npm downloads152kPackage downloads in the last 30 days.
Last commitTodayMost recent push to the default branch.
Tools exposed1Callable tools this server registers over MCP.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How Dbhub works

What dbhub does

dbhub provides an MCP gateway between compatible clients and relational databases. It supports PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, and SQLite through a common interface, allowing an agent to inspect schemas and run SQL without a separate MCP process for each database.

The default configuration exposes two tools: execute_sql for running queries and search_objects for finding database objects such as schemas, tables, columns, indexes, and procedures. The server is designed to keep its default tool surface small; the two default tools use about 1.4k tokens. Additional capabilities can be enabled when needed.

A built-in web Workbench provides another way to use the database tools. It can execute queries, run custom tools, and display request traces without an MCP client.

How it works

Clients connect to dbhub over MCP, and dbhub forwards database operations to the configured data sources. It can operate over stdio or HTTP. A TOML configuration file can describe multiple connections, making one dbhub process suitable for environments that use several databases.

Database access can be constrained with read-only mode, row limits, and query timeouts. SSH tunneling and SSL/TLS encryption are available for connections that require protected transport. execute_sql also supports transactions and safety controls.

Optional tools include explain_sql, which returns a query execution plan without executing the query, and health_check, which reports connection-pool state and buffer-cache hit ratio. Custom tools let operators define reusable, parameterized SQL operations in dbhub.toml.

Setup and configuration

The package can be started with npx, for example:

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

Docker, an MCP Bundle with read-only setup, and a Claude Code plugin are also available. Command-line options control runtime settings, while TOML configuration is the option for multiple database connections and custom tools.

For local development, dbhub requires Node.js 22.5.0 or newer because it uses Node's built-in node:sqlite module. The source project uses pnpm for dependency installation and provides development and production build commands.

Tools and capabilities

  • execute_sql: runs SQL with transaction support and safety controls.
  • search_objects: progressively explores schemas, tables, columns, indexes, and procedures.
  • explain_sql: optionally returns an execution plan without running the query.
  • health_check: optionally reports connection-pool and buffer-cache metrics.
  • Custom tools: exposes parameterized SQL operations declared in dbhub.toml.
  • Workbench: executes queries, runs custom tools, and shows request traces through a web interface.

Limitations and notes

dbhub focuses on a minimal database tool surface and does not provide the enterprise guardrails associated with Bytebase, such as approval flows, access control, data masking, or audit logging. Optional tools and custom operations must be enabled or configured when the default pair is insufficient. Read-only mode and other safety settings should be selected according to the risks of the target database.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Dbhub

dbhub is an MCP server that connects MCP-compatible clients to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, and SQLite. Its main tools execute SQL and search database objects; optional tools explain query plans and report connection health, while TOML-defined custom tools support reusable parameterized operations.

Install it with the latest npm package through npx, Docker, an MCP Bundle, or the Claude Code plugin. A basic HTTP launch uses `npx @bytebase/dbhub@latest --transport http --port 8080 --dsn "..."`. Node.js 22.5.0 or newer is required for local development.

Yes, dbhub works with Cursor through its MCP connection. The project also shows Claude Desktop, Claude Code, and VS Code as compatible clients, and dbhub can run over stdio or HTTP.

Define the connections in a TOML configuration file and start one dbhub process with that configuration. The multi-database setup allows a single interface to reach PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, and SQLite.

Yes, dbhub supports read-only mode, row limits, and query timeouts for controlled diagnostics. The optional `health_check` tool reports connection-pool state and buffer-cache hit ratio, while `explain_sql` shows a query plan without executing the query.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDbhub AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/dbhub?style=directory)](https://allmcps.com/mcp/dbhub)
HTML Embed
<a href="https://allmcps.com/mcp/dbhub"><img src="https://allmcps.com/api/badge/dbhub?style=directory" alt="Dbhub on AllMCPs" /></a>