DBHub MCP server
DBHub is an open-source MCP server by Bytebase that gives AI agents SQL access to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle and SQLite through one server with two default tools.
Connect DBHub
Claude Code, as a plugin (prompts for the connection string and stores it securely)
/plugin marketplace add bytebase/dbhubThen install the plugin
/plugin install dbhub@dbhubCodex, trying the built-in demo database first
codex mcp add dbhub -- npx @bytebase/dbhub@latest --transport stdio --demoRun as an HTTP server for any client (add your own --dsn instead of --demo)
npx @bytebase/dbhub@latest --transport http --port 8080 --demoPass your database with --dsn, for example a postgres:// URI with user and password, or keep several connections in a dbhub.toml file and use --config. From Docker, use host.docker.internal instead of localhost to reach a database on your machine.
Or paste this into your coding agent: Connect the DBHub MCP server to my coding agent using its documented setup: https://github.com/bytebase/dbhub.
What the DBHub MCP server does
DBHub is a database MCP server from Bytebase, the company behind a database DevOps platform. One DBHub process connects an AI agent to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle or SQLite, and a TOML file lets it hold several connections at once, for example a local dev database and a read-only replica. It supports SSH tunnels and SSL for databases behind a bastion host.
DBHub keeps its default tool list to two: execute_sql runs queries with transaction support, and search_objects explores schemas, tables, columns, indexes and procedures a step at a time. Bytebase measures this at about 1,400 tokens of context, against roughly 19,000 for some alternatives. Two opt-in tools show a query plan and report connection pool health, and you can define your own parameterized SQL tools in the config file. A built-in web workbench runs the same tools without an MCP client.
Guardrails include a read-only mode, a row limit and a query timeout. DBHub runs through npx (Node.js 22.5 or newer), Docker, an MCP Bundle file or a Claude Code plugin; the bundle and plugin are read-only by design. Claude Code's own docs use DBHub as the example for querying PostgreSQL. The repo had 3,589 GitHub stars on 2026-10-01.
Tools it gives your agent
execute_sqlsearch_objectsexplain_sqlhealth_check
When to use DBHub
- You work with more than one database engine and want a single MCP server for all of them.
- You want the agent to explore an unfamiliar schema without filling its context with tool definitions.
- You want to give non-technical teammates read-only views of data through Claude Desktop or VS Code.
- You need to reach a database behind an SSH bastion host.
When to pick something else
- Deep Postgres tuning such as index recommendations and health reports; Postgres MCP Pro specializes in that.
- Write access on production without care: unless read-only mode is on, execute_sql can change data.
What DBHub needs
- Node.js 22.5 or newer, or Docker
- A database connection string (DSN)
What the DBHub MCP server costs
Free and open source under MIT and run on your own machine, with no paid tier; Bytebase's enterprise product is separate.
Current prices: github.com . We do not list prices: vendors change them often, so check the publisher's own page.
Questions people ask
Is DBHub free?
Yes. DBHub is open source under MIT and runs on your own machine with no paid tier.
Which databases does DBHub support?
PostgreSQL, MySQL, MariaDB, SQL Server, Oracle and SQLite (README read 2026-10-01). SQLite needs no extra driver because DBHub uses Node's built-in module.
Other MCP servers for databases
- MongoDB: The MongoDB MCP server gives AI agents access to MongoDB databases and MongoDB Atlas: run find and aggregate queries, inspect schemas and indexes, and create or manage Atlas clusters and users.
- Neon: The Neon MCP server gives AI agents control of Neon serverless Postgres: create projects and branches, run SQL, inspect schemas, find slow queries and run migrations on a branch before applying them.
- Postgres MCP Pro: Postgres MCP Pro is an open-source MCP server that gives AI agents access to a PostgreSQL database, with schema browsing, safe SQL execution, EXPLAIN plans, index recommendations and database health checks.
- Redis: The Redis MCP server gives AI agents natural-language access to a Redis database: strings, hashes, lists, sets, sorted sets, streams, JSON documents, pub/sub and vector search indexes.