DBHub
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Integrations
Provides Docker container deployment options for running the DBHub server with configurable database connections and transport options.
Supports connecting to DuckDB databases to explore tables, access schema information, and perform read-only SQL queries with safety measures.
Provides access to MySQL databases for browsing tables, viewing schema information, and executing read-only SQL queries with safety protections.
DBHub is a universal database gateway implementing the Model Context Protocol (MCP) server interface. This gateway allows MCP-compatible clients to connect to and explore different databases.
Features
- Browse available tables in the database
- View schema information for tables
- Run read-only SQL queries against the database
- Safety checks to prevent dangerous queries
Installation
Docker
NPM
Usage
Configure your database connection
Database Source Name (DSN) is required to connect to your database. You can provide this in several ways:
- Command line argument (highest priority):Copy
- Environment variable (second priority):Copy
- Environment file (third priority):
- For development: Create
.env.local
with your DSN - For production: Create
.env
with your DSN
Copy - For development: Create
Transport
- stdio (default) - for direct integration with tools like Claude Desktop:Copy
- sse - for browser and network clients:Copy
Command line options
Option | Description | Default |
---|---|---|
dsn | Database connection string | Required if not set via environment |
transport | Transport mode: stdio or sse | stdio |
port | HTTP server port (only applicable when using --transport=sse ) | 8080 |
Claude Desktop
- Claude Desktop only supports
stdio
transport https://github.com/orgs/modelcontextprotocol/discussions/16
Docker
NPX
Development
- Install dependencies:Copy
- Run in development mode:Copy
- Build for production:Copy
Debug with MCP Inspector
stdio
SSE
Connect to the DBHub server /sse
endpoint
This server cannot be installed
Universal database MCP server connecting to MySQL, PostgreSQL, SQLite, DuckDB and etc.