DBHub Analytics
MCP server for Databricks, BigQuery, PostgreSQL, MySQL, SQL Server, SQLite, MariaDB
Que pouvez-vous faire avec DBHub Analytics ?
- Cloud Data Warehouses: Connect to Databricks SQL and Google BigQuery for analytics workloads
- Traditional Databases: Full support for PostgreSQL, MySQL, MariaDB, SQL Server, SQLite
- Multi-Database: Connect to multiple databases simultaneously with a single TOML config file
- Schema Explorer: Progressive disclosure — browse catalogs, datasets, schemas, tables, and columns
- Safety Guardrails: Read-only mode, row limits, and query timeouts to prevent runaway operations
- Secure Access: SSH tunneling, SSL/TLS encryption, and service account authentication
- Zero Config: Just provide a DSN — no drivers to install, no complex setup
Installation
Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).
dbhub-analyticsclaude mcp add dbhub-analytics -e 'DSN=<your dsn>' -e 'DB_TYPE=<DB_TYPE>' -e 'DB_HOST=<DB_HOST>' -e 'DB_PORT=<DB_PORT>' -e 'DB_USER=<DB_USER>' -e 'DB_PASSWORD=<your db_password>' -e 'DB_NAME=<DB_NAME>' -e 'TRANSPORT=<TRANSPORT>' -e 'PORT=<PORT>' -e 'ID=<ID>' -e 'SSH_HOST=<SSH_HOST>' -e 'SSH_PORT=<SSH_PORT>' -e 'SSH_USER=<SSH_USER>' -e 'SSH_PASSWORD=<your ssh_password>' -e 'SSH_KEY=<SSH_KEY>' -e 'SSH_PASSPHRASE=<your ssh_passphrase>' -- npx -y dbhub-analytics@0.2.0
{
"mcpServers": {
"dbhub-analytics": {
"command": "npx",
"args": [
"-y",
"dbhub-analytics@0.2.0"
],
"env": {
"DSN": "<your dsn>",
"DB_TYPE": "<DB_TYPE>",
"DB_HOST": "<DB_HOST>",
"DB_PORT": "<DB_PORT>",
"DB_USER": "<DB_USER>",
"DB_PASSWORD": "<your db_password>",
"DB_NAME": "<DB_NAME>",
"TRANSPORT": "<TRANSPORT>",
"PORT": "<PORT>",
"ID": "<ID>",
"SSH_HOST": "<SSH_HOST>",
"SSH_PORT": "<SSH_PORT>",
"SSH_USER": "<SSH_USER>",
"SSH_PASSWORD": "<your ssh_password>",
"SSH_KEY": "<SSH_KEY>",
"SSH_PASSPHRASE": "<your ssh_passphrase>"
}
}
}
}
Variables d'environnement
DSNsecret Database connection string (e.g., postgres://user:pass@host:5432/db)DB_TYPEDatabase type: postgres, mysql, mariadb, sqlserver, sqlite, databricks, bigqueryDB_HOSTDatabase hostnameDB_PORTDatabase portDB_USERDatabase usernameDB_PASSWORDsecret Database passwordDB_NAMEDatabase name or SQLite file pathTRANSPORTTransport mode: stdio or httpPORTHTTP server port (default: 8080)IDInstance identifier for tool namesSSH_HOSTSSH server hostnameSSH_PORTSSH server port (default: 22)SSH_USERSSH usernameSSH_PASSWORDsecret SSH passwordSSH_KEYPath to SSH private keySSH_PASSPHRASEsecret SSH key passphrase
Documentation
Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.
Sommaire
DBHub Analytics
Universal Database MCP Server for Databricks, Google BigQuery, PostgreSQL, MySQL, SQL Server, SQLite, MariaDB
What is DBHub Analytics?
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
Key Features
- Cloud Data Warehouses: Connect to Databricks SQL and Google BigQuery for analytics workloads
- Traditional Databases: Full support for PostgreSQL, MySQL, MariaDB, SQL Server, SQLite
- Multi-Database: Connect to multiple databases simultaneously with a single TOML config file
- Schema Explorer: Progressive disclosure — browse catalogs, datasets, schemas, tables, and columns
- Safety Guardrails: Read-only mode, row limits, and query timeouts to prevent runaway operations
- Secure Access: SSH tunneling, SSL/TLS encryption, and service account authentication
- Zero Config: Just provide a DSN — no drivers to install, no complex setup
Supported 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 |
MCP Tools
| 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 |
Quick Start
NPM (recommended)
npx dbhub-analytics --dsn "postgres://user:password@localhost:5432/dbname"
Databricks SQL
npx dbhub-analytics --dsn "databricks://token:YOUR_TOKEN@your-workspace.cloud.databricks.com/sql/2.0/warehouses/your_warehouse_id"
Google BigQuery
npx dbhub-analytics --dsn "bigquery://your-gcp-project/your_dataset?keyFile=/path/to/service-account.json&location=US"
Docker
docker run --rm --init \
--name dbhub-analytics \
--publish 8080:8080 \
amansingh63/dbhub-analytics \
--transport http \
--port 8080 \
--dsn "postgres://user:password@localhost:5432/dbname"
Demo Mode
npx dbhub-analytics --demo
Connect to Your AI Assistant
Claude Desktop / Claude Code
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"]
}
}
}
GitHub Copilot (VS Code)
Add to your .vscode/mcp.json:
{
"servers": {
"dbhub-analytics": {
"command": "npx",
"args": ["-y", "dbhub-analytics", "--dsn", "postgres://user:pass@localhost:5432/dbname"]
}
}
}
Cursor
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"]
}
}
}
Windsurf
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"]
}
}
}
Multi-Database via TOML Config
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"]
}
}
}
Configuration
DSN Connection Strings
| 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 |
Multi-Database Setup (TOML)
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.
Use Cases
- Data Analysts: Ask Claude to query your Databricks or BigQuery data warehouse in natural language
- Backend Engineers: Explore database schemas, run diagnostic queries, and debug issues via AI
- DevOps/SRE: Connect to production read-replicas safely with read-only mode and row limits
- Data Scientists: Query multiple databases simultaneously — join insights across PostgreSQL and BigQuery
Development
# Install dependencies
pnpm install
# Run in development mode
pnpm dev
# Build for production
pnpm build
# Run tests
pnpm test
Credits
Built on top of DBHub by Bytebase, an open-source database DevSecOps platform. Licensed under MIT.
Questions fréquentes
Qu'est-ce que DBHub Analytics ?
MCP server for Databricks, BigQuery, PostgreSQL, MySQL, SQL Server, SQLite, MariaDB
Comment installer DBHub Analytics ?
Il s'exécute sur votre machine. Dans Claude Code : claude mcp add dbhub-analytics -e 'DSN=<your dsn>' -e 'DB_TYPE=<DB_TYPE>' -e 'DB_HOST=<DB_HOST>' -e 'DB_PORT=<DB_PORT>' -e 'DB_USER=<DB_USER>' -e 'DB_PASSWORD=<your db_password>' -e 'DB_NAME=<DB_NAME>' -e 'TRANSPORT=<TRANSPORT>' -e 'PORT=<PORT>' -e 'ID=<ID>' -e 'SSH_HOST=<SSH_HOST>' -e 'SSH_PORT=<SSH_PORT>' -e 'SSH_USER=<SSH_USER>' -e 'SSH_PASSWORD=<your ssh_password>' -e 'SSH_KEY=<SSH_KEY>' -e 'SSH_PASSPHRASE=<your ssh_passphrase>' -- npx -y dbhub-analytics@0.2.0. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.
Faut-il une clé API pour DBHub Analytics ?
Oui. Il attend DSN, DB_PASSWORD, SSH_PASSWORD, SSH_PASSPHRASE, à renseigner dans sa configuration.
DBHub Analytics est-il open source ?
Oui. Son code est sur GitHub sous licence MIT.
Qui maintient DBHub Analytics ?
Il est publié par amansingh63. AI.tn le référence sans le maintenir ni le recommander.
Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.