dbhub MCP Server
Overview
Token conscious database MCP server for Postgres, MySQL, SQL Server, Oracle, MariaDB, SQLite.
From the project README: "DBHub is a minimal MCP server: token-efficient, zero-dependency, and just two tools by default with opt-in extras. This lightweight gateway allows MCP-compatible clients to connect to and explore different databases:"
What it can do
The README lists these tools and features:
- execute_sql: Execute SQL queries with transaction support and safety controls
- search_objects: Search and explore database schemas, tables, columns, indexes, and procedures with progressive disclosure
- explain_sql (opt-in): Show a query's execution plan without running it
- health_check (opt-in): Report connection pool state and buffer cache hit ratio
- Custom Tools: Define reusable, parameterized SQL operations in your dbhub.toml configuration file
Install and configure
These commands were found in the project's own README. We checked each package name against the public registry.
npx @bytebase/dbhub@latest --transport http --port 8080 --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"
(@bytebase/dbhub found on npm, latest 1.5.0)
The official MCP Registry lists this server with these packages:
| Registry | Package | Version | Transport |
|---|---|---|---|
| npm | @bytebase/dbhub | 0.13.1 | stdio |
Environment variables:
| Variable | Required | Description |
|---|---|---|
DSN |
optional | Database connection string (e.g., postgres://user:pass@host:5432/db) |
DB_TYPE |
optional | Database type: postgres, mysql, mariadb, sqlserver, sqlite |
DB_HOST |
optional | Database hostname |
DB_PORT |
optional | Database port |
DB_USER |
optional | Database username |
DB_PASSWORD |
optional | Database password |
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 for tool names |
SSH_HOST |
optional | SSH server hostname |
SSH_PORT |
optional | SSH server port (default: 22) |
Requirements
The package declares Node.js >=22.5.0 in its engines field. The README mentions setup for these clients: Claude Desktop, Claude Code, Cursor, VS Code, Zed.
Limitations and things to check
Before you connect it:
- The README mentions: can run commands or code on your machine; needs credentials or api keys; connects to databases; manages infrastructure or cloud resources.
- Read the code or the documentation of the tools it exposes, and note what each tool can do.
- Grant the smallest permissions you can: limit folders, API scopes and database roles.
- Keep credentials in environment variables or a secrets manager, never in a shared config file.
- Run it in a container or a separate user account if it can execute code or touch files.
Release history
The most recent releases published on GitHub:
- v1.5.0 (2026-10-09): ## What's Changed docs: point CLAUDE.md at src/connectors/interface.ts by @roli-lpci in https://github.com/bytebase/dbhub/pull/447 fix(config): reject empty TOML sslmode before DSN fallback by @tsiakoulias in https://github.com/bytebase/dbhub/pull/451 fix(sqlserver): support verify-full TLS mode…
- v1.4.0 (2026-09-28): ## What's Changed Add glama.json to enable claiming the Glama listing by @adela-bytebase in https://github.com/bytebase/dbhub/pull/440 Support sslcert/sslkey client certificate authentication for PostgreSQL by @tianzhou in https://github.com/bytebase/dbhub/pull/441 Reject sslrootcert and unknown…
- v1.3.1 (2026-09-21): ## What's Changed fix: reload AWS credentials from disk on every RDS IAM token refresh by @tianzhou in https://github.com/bytebase/dbhub/pull/438 Full Changelog: https://github.com/bytebase/dbhub/compare/v1.3.0...v1.3.1
Known issues and troubleshooting
These are the most discussed threads on the project's issue tracker. They show what other users ran into; read them before you install, and check whether they are still open.
- 👉👉👉 Please share your use case to shape DBHub roadmap (open, 26 comments)
Maintenance and community
The repository has 42 contributors, 389 commits in the last 12 months, 3 open issues and pull requests. It is maintained by Bytebase, a GitHub organisation with 33 public repositories and 413 followers. GitHub's community checks found no security policy file, no contribution guidelines, no code of conduct. The npm package has 4 maintainers, 8 direct dependencies and was downloaded 34,901 times in the last week.
Frequently asked questions
Is dbhub free to use?
The repository is released under the MIT license.
When was dbhub last updated?
The last commit was on 2026-10-26, and the project is marked active by our 12-month check.
Which AI clients does dbhub work with?
Its README gives setup notes for Claude Desktop, Claude Code, Cursor, VS Code, Zed. Other MCP-compatible clients may also work, but the project does not say so.
Sources
This page combines data from:
- dbhub on GitHub
- Introduction - DBHub, Minimal Database MCP Server
- Connect Claude Code to tools via MCP - Claude Code Docs
- execute_sql - DBHub, Minimal Database MCP Server
- Official MCP Registry entry (registry.modelcontextprotocol.io)
- npm package
@bytebase/dbhub
Security snapshot
- Can run commands or code on your machine
- Needs credentials or API keys
- Connects to databases
- Manages infrastructure or cloud resources
Automated checks on public data, last run Oct 31, 2026. This is not a security audit. Read the code and decide which permissions to grant before you connect any MCP server.