by bytebase
Provides a universal gateway that lets MCP‑compatible clients explore and query MySQL, PostgreSQL, SQL Server, MariaDB, and SQLite databases through a single standardized interface.
DBHub acts as a bridge between various relational databases and tools that understand the Model Context Protocol (MCP). It translates MCP requests into native database operations, enabling AI assistants such as Claude Desktop, Claude Code, Cursor, and other MCP clients to browse schemas, run queries, and retrieve metadata without writing custom connectors.
npx:
npx @bytebase/dbhub --transport http --port 8080 --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"
Replace the DSN with the connection string for MySQL, MariaDB, SQL Server, SQLite, or PostgreSQL.stdio for direct integration with desktop AI tools, or http for network‑based clients (Cursor, MCP Inspector, etc.).npx @bytebase/dbhub --transport http --port 8080 --demo
npx @bytebase/dbhub --readonly --dsn "postgres://..."
execute_sql) plus AI‑driven prompts (generate_sql, explain_db).sslmode=disable|require).npx to prototype AI‑driven queries.npx or Docker.sqlite:///path/to/file.db.stdio transport for local AI tools.[!NOTE]
Brought to you by Bytebase, open-source database DevSecOps platform.
+------------------+ +--------------+ +------------------+
| | | | | |
| | | | | |
| Claude Desktop +--->+ +--->+ PostgreSQL |
| | | | | |
| Claude Code +--->+ +--->+ SQL Server |
| | | | | |
| Cursor +--->+ DBHub +--->+ SQLite |
| | | | | |
| VS Code +--->+ +--->+ MySQL |
| | | | | |
| Other Clients +--->+ +--->+ MariaDB |
| | | | | |
| | | | | |
+------------------+ +--------------+ +------------------+
MCP Clients MCP Server Databases
DBHub is a Universal Database MCP Server implementing the Model Context Protocol (MCP) server interface. This gateway allows MCP-compatible clients to connect to and explore different databases:
PostgreSQL, MySQL, SQL Server, MariaDB, and SQLite.
DBHub implements MCP Resources, Tools, and Prompts for database operations:
See the full Installation Guide for detailed instructions.
Docker:
docker run --rm --init \
--name dbhub \
--publish 8080:8080 \
bytebase/dbhub \
--transport http \
--port 8080 \
--dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"
NPM:
npx @bytebase/dbhub --transport http --port 8080 --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"
Demo Mode:
npx @bytebase/dbhub --transport http --port 8080 --demo
See Server Options for all available parameters.
Connect to multiple databases simultaneously using TOML configuration files. Perfect for managing production, staging, and development databases from a single DBHub instance.
See Multi-Database Configuration for complete setup instructions.
Install dependencies:
pnpm install
Run in development mode:
pnpm dev
Build for production:
pnpm build
pnpm start --transport stdio --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"
See TESTING.md.
See Debug.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by googleapis
An MCP server that streamlines database tool development by handling connection pooling, authentication, observability, and secure access, allowing agents to interact with databases via natural language.
by designcomputer
Enables secure interaction with MySQL databases via the Model Context Protocol, allowing AI applications to list tables, read contents, and execute queries safely.
by benborla
Provides read‑only access to MySQL databases for large language models, allowing schema inspection and safe execution of SQL queries.
by neo4j-contrib
Enables natural‑language interaction with Neo4j databases, allowing large language models to query, modify, and manage graph data through multiple transport modes.
by mongodb-js
Provides a Model Context Protocol server that enables interaction with MongoDB databases and MongoDB Atlas clusters through a unified API.
by ClickHouse
Enables AI assistants to run read‑only ClickHouse queries, list databases and tables, and execute embedded chDB queries through an MCP interface.
by neondatabase
Interact with Neon Postgres databases using natural language commands through the Model Context Protocol, enabling conversational database creation, migration, and query execution.
by domdomegg
Provides read and write access to Airtable bases for AI systems, enabling inspection of schemas and manipulation of records.
by motherduckdb
Enables SQL analytics on DuckDB and MotherDuck databases via a Model Context Protocol server, allowing AI assistants and IDEs to query data directly.
{
"mcpServers": {
"dbhub": {
"command": "npx",
"args": [
"-y",
"@bytebase/dbhub",
"--transport",
"stdio",
"--dsn",
"<YOUR_DSN>"
],
"env": {}
}
}
}claude mcp add dbhub npx -y @bytebase/dbhub --transport stdio --dsn <YOUR_DSN>