DBHub logo

DBHub

Free

通用数据库 MCP 服务器,可连接 MySQL, PostgreSQL, SQLite, DuckDB 等。

FreeFree tier
Type
Open Source
Company
Bytebase

About DBHub

DBHub is a zero-dependency, token-efficient database MCP (Model Context Protocol) server that enables MCP-compatible clients to connect to and explore multiple databases through a single interface. It supports PostgreSQL, MySQL, SQL Server, MariaDB, and SQLite. DBHub is designed for local development with a focus on maximizing the context window by providing just two core MCP tools: execute_sql for executing SQL queries with transaction support and safety controls, and search_objects for exploring database schemas with progressive disclosure. It also supports custom reusable SQL operations defined via TOML configuration, multi-connection capabilities, guardrails like read-only mode and row limiting, and secure access via SSH tunneling and SSL/TLS encryption. Additionally, DBHub includes a built-in web workbench for visual query execution and trace viewing.

Key Features

Zero-dependency and token-efficient with just two core MCP tools
Supports PostgreSQL, MySQL, SQL Server, MariaDB, and SQLite
Multi-connection via TOML configuration file
Guardrails: read-only mode, row limiting, query timeout
Secure access with SSH tunneling and SSL/TLS encryption
MCP tools: execute_sql (with transaction support) and search_objects (schema exploration)
Custom reusable SQL operations defined in dbhub.toml
Built-in web workbench for visual query execution and request tracing

Pros & Cons

Pros
  • Zero-dependency and lightweight, maximizing token context window
  • Supports five major SQL databases through a single unified interface
  • Includes safety guardrails to prevent runaway operations
  • Provides secure connection options (SSH tunneling, SSL/TLS)
  • Offers both CLI/NPM and Docker installation methods
  • Built-in web workbench for visual database interaction
Cons
  • Requires Node.js version 22.5.0 or higher for NPM installation
  • Only supports SQL databases, no NoSQL support listed
  • Limited to MCP-compatible clients; not a standalone database client

Best For

Connecting AI assistants like Claude Desktop, Claude Code, Cursor, VS Code, and Copilot CLI to databases via MCPExploring database schemas, tables, columns, indexes, and proceduresExecuting SQL queries with safety controls and transaction supportManaging multiple database connections simultaneouslyLocal database development and testing with token-efficient tools

FAQ

What databases does DBHub support?
DBHub supports PostgreSQL, MySQL, SQL Server, MariaDB, and SQLite.
How can I install DBHub?
You can install DBHub via Docker (docker run bytebase/dbhub) or via NPM (npx @bytebase/dbhub@latest). A one-click MCP bundle (.mcpb) is also available for compatible clients like Claude Desktop.
Is DBHub free and open source?
Yes, DBHub is free and open source, licensed under a permissive license (see LICENSE file in the repository).
Does DBHub provide a web interface?
Yes, DBHub includes a built-in web workbench that provides a visual way to execute queries, run custom tools, and view request traces without requiring an MCP client.
What safety features does DBHub have?
DBHub offers read-only mode, row limiting, and query timeout to prevent runaway operations. It also supports SSH tunneling and SSL/TLS encryption for secure access.