Connects Claude to seven database systems through a single interface: Databricks SQL, BigQuery, PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite. Exposes two core MCP tools: execute_sql for running queries with read-only enforcement and row limits, and search_objects for browsing catalogs, schemas, tables, and columns. You can connect to multiple databases simultaneously via a TOML config file, which makes it useful when you need to query across different data sources in one conversation. Built on Bytebase's DBHub project. Supports SSH tunneling, SSL/TLS, and service account auth for BigQuery. The progressive schema disclosure is handy when you're exploring unfamiliar databases and don't want to dump entire schemas at once.
Universal Database MCP Server for Databricks, Google BigQuery, PostgreSQL, MySQL, SQL Server, SQLite, MariaDB
DBHub Analytics is an open-source MCP (Model Context Protocol) server that connects AI assistants like Claude Desktop, Claude Code, Cursor, VS Code Copilot, and other MCP-compatible clients to your databases. Query Databricks SQL warehouses, Google BigQuery datasets, PostgreSQL, MySQL, and more — all through a single unified interface.
+------------------+ +--------------+ +------------------+
| | | | | |
| Claude Desktop +--->+ +--->+ PostgreSQL |
| | | | | |
| Claude Code +--->+ +--->+ SQL Server |
| | | DBHub | | |
| Cursor +--->+ Analytics +--->+ SQLite |
| | | | | |
| VS Code +--->+ +--->+ MySQL |
| | | | | |
| Copilot CLI +--->+ +--->+ MariaDB |
| | | | | |
| | | +--->+ Databricks |
| | | | | |
| | | +--->+ BigQuery |
| | | | | |
+------------------+ +--------------+ +------------------+
MCP Clients MCP Server Databases
| Database | DSN Protocol | Status |
|---|---|---|
| PostgreSQL | postgres:// | Stable |
| MySQL | mysql:// | Stable |
| MariaDB | mariadb:// | Stable |
| SQL Server | sqlserver:// | Stable |
| SQLite | sqlite:/// | Stable |
| Databricks SQL | databricks:// | Stable |
| Google BigQuery | bigquery:// | Stable |
| Tool | Description |
|---|---|
execute_sql | Execute SQL queries with read-only enforcement and row limiting |
search_objects | Browse catalogs, schemas, tables, columns, indexes, and routines |
| Custom Tools | Define reusable, parameterized SQL queries in dbhub.toml |
npx dbhub-analytics --dsn "postgres://user:password@localhost:5432/dbname"
npx dbhub-analytics --dsn "databricks://token:YOUR_TOKEN@your-workspace.cloud.databricks.com/sql/2.0/warehouses/your_warehouse_id"
npx dbhub-analytics --dsn "bigquery://your-gcp-project/your_dataset?keyFile=/path/to/service-account.json&location=US"
docker run --rm --init \
--name dbhub-analytics \
--publish 8080:8080 \
amansingh63/dbhub-analytics \
--transport http \
--port 8080 \
--dsn "postgres://user:password@localhost:5432/dbname"
npx dbhub-analytics --demo
Add to your claude_desktop_config.json or .mcp.json:
{
"mcpServers": {
"dbhub-analytics": {
"command": "npx",
"args": ["-y", "dbhub-analytics", "--dsn", "bigquery://your-project/your_dataset?keyFile=/path/to/sa.json&location=US"]
}
}
}
Add to your .vscode/mcp.json:
{
"servers": {
"dbhub-analytics": {
"command": "npx",
"args": ["-y", "dbhub-analytics", "--dsn", "postgres://user:pass@localhost:5432/dbname"]
}
}
}
Add to your Cursor MCP settings (~/.cursor/mcp.json):
{
"mcpServers": {
"dbhub-analytics": {
"command": "npx",
"args": ["-y", "dbhub-analytics", "--dsn", "databricks://token:YOUR_TOKEN@host/sql/2.0/warehouses/ID"]
}
}
}
Add to your Windsurf MCP config (~/.codeium/windsurf/mcp_config.json):
{
"mcpServers": {
"dbhub-analytics": {
"command": "npx",
"args": ["-y", "dbhub-analytics", "--dsn", "mysql://user:pass@localhost:3306/dbname"]
}
}
}
For connecting to multiple databases, use a TOML config file with any of the above clients:
{
"mcpServers": {
"dbhub-analytics": {
"command": "npx",
"args": ["-y", "dbhub-analytics", "--config", "/path/to/dbhub.toml"]
}
}
}
| Database | Format |
|---|---|
| PostgreSQL | postgres://user:pass@host:5432/dbname?sslmode=require |
| MySQL | mysql://user:pass@host:3306/dbname |
| MariaDB | mariadb://user:pass@host:3306/dbname |
| SQL Server | sqlserver://user:pass@host:1433/dbname |
| SQLite | sqlite:///path/to/file.db or sqlite:///:memory: |
| Databricks | databricks://token:TOKEN@host/sql/2.0/warehouses/ID?catalog=CAT&schema=SCH |
| BigQuery | bigquery://PROJECT_ID/DATASET?keyFile=/path/to/key.json&location=US |
Connect to multiple databases simultaneously. Create a dbhub.toml file:
[[sources]]
id = "databricks_prod"
type = "databricks"
host = "adb-xxx.azuredatabricks.net"
password = "dapi..."
path = "/sql/2.0/warehouses/abc123"
[[sources]]
id = "bigquery_analytics"
type = "bigquery"
project = "my-gcp-project"
database = "analytics_dataset"
location = "US"
[[sources]]
id = "postgres_prod"
type = "postgres"
host = "localhost"
port = 5432
database = "production"
user = "dbuser"
password = "secret"
Then run:
npx dbhub-analytics --config dbhub.toml
See Multi-Database Configuration and Command-Line Options for complete documentation.
# Install dependencies
pnpm install
# Run in development mode
pnpm dev
# Build for production
pnpm build
# Run tests
pnpm test
Built on top of DBHub by Bytebase, an open-source database DevSecOps platform. Licensed under MIT.
DSNsecretDatabase connection string (e.g., postgres://user:pass@host:5432/db)
DB_TYPEDatabase type: postgres, mysql, mariadb, sqlserver, sqlite, databricks, bigquery
DB_HOSTDatabase hostname
DB_PORTDatabase port
DB_USERDatabase username
DB_PASSWORDsecretDatabase password
DB_NAMEDatabase name or SQLite file path
TRANSPORTTransport mode: stdio or http
PORTHTTP server port (default: 8080)
IDInstance identifier for tool names
SSH_HOSTSSH server hostname
SSH_PORTSSH server port (default: 22)
SSH_USERSSH username
SSH_PASSWORDsecretSSH password
SSH_KEYPath to SSH private key
SSH_PASSPHRASEsecretSSH key passphrase
hovecapital/read-only-local-postgres-mcp-server
cocaxcode/database-mcp
io.github.infoinlet-marketplace/mcp-mysql
io.github.cybeleri/database-admin
io.github.yash-0620/postgres-mcp-secured