DEV.co
MCP Servers · bytebase

dbhub

DBHub is a lightweight MCP server that connects AI assistants (Claude, Cursor, VS Code) to multiple SQL databases with zero external dependencies. It provides two core tools—execute SQL queries and search database schemas—optimized for token efficiency in LLM contexts.

Source: GitHub — github.com/bytebase/dbhub
3.1k
GitHub stars
265
Forks
TypeScript
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorybytebase/dbhub
Ownerbytebase
Primary languageTypeScript
LicenseMIT — OSI-approved
Stars3.1k
Forks265
Open issues2
Latest releaseUnknown
Last updated2026-06-30
Sourcehttps://github.com/bytebase/dbhub

What dbhub is

TypeScript-based MCP server implementing the Model Context Protocol for Postgres, MySQL, SQL Server, MariaDB, and SQLite. Features include multi-database routing via TOML config, transaction support, read-only mode, row limiting, query timeouts, SSH tunneling, and SSL/TLS encryption. Ships with a web workbench for standalone query execution.

Quickstart

Get the dbhub source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/bytebase/dbhub.gitcd dbhub# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

AI-Assisted Database Exploration and Querying

Integrate DBHub with Claude Desktop, Cursor, or VS Code to enable AI assistants to explore schemas, write queries, and execute them directly—ideal for rapid development and schema discovery workflows.

Multi-Database Management for DevOps Teams

Use TOML configuration to expose production, staging, and development databases through a single DBHub instance, with guardrails (read-only mode, row limits, timeouts) to prevent accidental damage.

LLM Agents with Database Context

Provide language models token-efficient access to database metadata and query execution for agentic workflows, knowledge retrieval, or data-driven decision-making without loading entire schemas into context.

Implementation considerations

  • Node.js >= 22.5.0 required; relies on built-in `node:sqlite` module. Ensure runtime compatibility across deployment environments.
  • HTTP transport defaults to 0.0.0.0; bind to 127.0.0.1 and front with reverse proxy (nginx, Caddy) or firewall for production. DNS-rebinding protection included but requires allowlist configuration if behind custom hostnames.
  • DSN-based connection strings for single database; use TOML for multi-database setups. Store credentials securely (environment variables, secrets manager) rather than in code.
  • Read-only mode, row limits, and query timeouts are opt-in guardrails—configure them explicitly to prevent unintended data access or runaway queries.
  • No built-in high-availability or clustering; design as a stateless microservice and replicate across nodes if needed.

When to avoid it — and what to weigh

  • Need Built-in Authentication — HTTP transport has no client authentication; relies on network isolation or reverse proxy auth. Not suitable if you require per-user database authentication through DBHub itself.
  • Require Write Operations at Scale — Designed for read-heavy and exploratory workflows; lacks transaction batching, bulk operations, or optimizations for high-volume writes.
  • Proprietary Database Support Required — Supports only Postgres, MySQL, SQL Server, MariaDB, and SQLite. If you need Oracle, Redshift, Snowflake, or other vendors, this is not a fit.
  • Production with Audit/Compliance Needs — No mention of query logging, audit trails, or compliance features (HIPAA, SOC 2, etc.). Requires external monitoring if regulatory auditing is mandatory.

License & commercial use

MIT License (OSI-approved, permissive). Permits commercial use, modification, and distribution with minimal restrictions.

MIT license explicitly permits commercial use. However, the project offers no warranty; review the full license text and conduct security/compliance due diligence before production deployment. No SLA, commercial support, or warranty provided by the project.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

HTTP transport has no built-in client authentication; reliance on network isolation or reverse proxy is mandatory. SSH tunneling and SSL/TLS encryption supported for database connections. No query logging or audit trail mentioned. Credentials passed via DSN string or TOML config—ensure they are externalized and not committed to version control. Read-only mode, row limits, and timeouts are opt-in safeguards and must be explicitly configured. No security advisories, CVE history, or penetration test results provided in data.

Alternatives to consider

DuckDB (with SQL-over-HTTP)

Lightweight, in-process SQL engine with HTTP support. Lacks multi-database routing and MCP protocol; better for single-node, read-heavy analytics.

Dataedo or SchemaCrawler

Schema documentation and visualization tools; do not implement MCP or direct LLM integration, but excel at database discovery and compliance reporting.

pg_partman, AWS Glue, or cloud-native query services

If locked into a single cloud provider (AWS, Azure, GCP), cloud-native query engines may offer better integration, scalability, and compliance features than a self-hosted MCP server.

Software development agency

Build on dbhub with DEV.co software developers

Our engineers can help design a secure, scalable MCP deployment, configure multi-database routing, and build custom tools for your LLM agents. Let's discuss your requirements.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

dbhub FAQ

Can I use DBHub without MCP clients (e.g., standalone)?
Yes. A built-in web workbench is provided for interactive query execution and tool testing without requiring an MCP-compatible client. HTTP transport also allows custom integrations.
Is DBHub safe for production with untrusted users?
Not out-of-the-box. HTTP transport has no authentication; you must isolate it on a private network or front it with a reverse proxy that enforces auth. Read-only mode and row limits reduce risk but are opt-in.
Does DBHub support real-time sync or change data capture?
Not mentioned. DBHub is a query gateway, not a data pipeline. For CDC, use database-native tools (Postgres WAL, MySQL binlog) or external services.
What databases can I connect to?
Postgres, MySQL, MariaDB, SQL Server, and SQLite. Other databases (Oracle, Redshift, Snowflake, etc.) are not supported.

Custom software development services

DEV.co helps companies turn open-source tools like dbhub into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your mcp servers stack.

Need Help Integrating DBHub into Your AI Workflow?

Our engineers can help design a secure, scalable MCP deployment, configure multi-database routing, and build custom tools for your LLM agents. Let's discuss your requirements.