DBHub Analytics

io.github.amansingh63由 GitHub 帳號 amansingh63 發布v0.2.0更新於 Oct 24, 2026

MCP server for Databricks, BigQuery, PostgreSQL, MySQL, SQL Server, SQLite, MariaDB

已驗證STDIO僅桌面資料庫資料與分析

概覽

AI 產生的概覽

讓 AI 助理透過單一介面在 PostgreSQL、MySQL、MariaDB、SQL Server、SQLite、Databricks 與 BigQuery 上執行 SQL 並瀏覽結構。

可以做什麼
DBHub Analytics 是本地 MCP 伺服器,將 MCP 用戶端連接至一個或多個資料庫。主要工具為 execute_sql,在唯讀限制與資料列上限下執行 SQL,以及 search_objects,用來瀏覽 catalog、schema、資料表、欄位、索引與常式。可在 dbhub.toml 中定義可重複使用的參數化查詢作為自訂工具,並支援同時設定多個資料庫。
適用情境
適合讓助理直接查詢或探索資料庫的情境,例如以自然語言查詢 Databricks 或 BigQuery 資料倉儲、檢視資料表結構,或對唯讀副本執行診斷查詢。也適合希望以一個伺服器涵蓋多種資料庫引擎的團隊。
執行需求
透過 npx(Node.js)或 Docker 在本機執行。需要每個資料庫的連線資訊:DSN,或 DB_HOST、DB_PORT、DB_NAME、DB_USER、DB_PASSWORD 以及 DB_TYPE。Databricks 與 BigQuery 需要權杖或服務帳戶金鑰檔案;SSH 通道需要 SSH_HOST、SSH_PORT、SSH_USER 以及金鑰或密碼。需要能連線至資料庫的網路。
安裝前請注意
此伺服器會接觸資料庫憑證:DSN、DB_PASSWORD、SSH_PASSWORD、SSH_PASSPHRASE 與 SSH_KEY,DSN 中可能內嵌密碼或 Databricks 權杖。雖然提供唯讀模式與資料列上限,execute_sql 仍可對正式環境資料執行查詢,建議指向唯讀副本或受限帳號,並在使用前確認唯讀設定。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 DBHub Analytics,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

DBHub Analytics

Universal Database MCP Server for Databricks, Google BigQuery, PostgreSQL, MySQL, SQL Server, SQLite, MariaDB

[npm version] [License: MIT]

Built on top of DBHub by Bytebase.

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

DatabaseDSN ProtocolStatus
PostgreSQLpostgres://Stable
MySQLmysql://Stable
MariaDBmariadb://Stable
SQL Serversqlserver://Stable
SQLitesqlite:///Stable
Databricks SQLdatabricks://Stable
Google BigQuerybigquery://Stable

MCP Tools

ToolDescription
execute_sqlExecute SQL queries with read-only enforcement and row limiting
search_objectsBrowse catalogs, schemas, tables, columns, indexes, and routines
Custom ToolsDefine reusable, parameterized SQL queries in dbhub.toml

Quick Start

NPM (recommended)

bash
npx dbhub-analytics --dsn "postgres://user:password@localhost:5432/dbname"

Databricks SQL

bash
npx dbhub-analytics --dsn "databricks://token:[email protected]/sql/2.0/warehouses/your_warehouse_id"

Google BigQuery

bash
npx dbhub-analytics --dsn "bigquery://your-gcp-project/your_dataset?keyFile=/path/to/service-account.json&location=US"

Docker

bash
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

bash
npx dbhub-analytics --demo

Connect to Your AI Assistant

Claude Desktop / Claude Code

Add to your claude_desktop_config.json or .mcp.json:

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:

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):

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):

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:

json
{  "mcpServers": {    "dbhub-analytics": {      "command": "npx",      "args": ["-y", "dbhub-analytics", "--config", "/path/to/dbhub.toml"]    }  }}

Configuration

DSN Connection Strings

DatabaseFormat
PostgreSQLpostgres://user:pass@host:5432/dbname?sslmode=require
MySQLmysql://user:pass@host:3306/dbname
MariaDBmariadb://user:pass@host:3306/dbname
SQL Serversqlserver://user:pass@host:1433/dbname
SQLitesqlite:///path/to/file.db or sqlite:///:memory:
Databricksdatabricks://token:TOKEN@host/sql/2.0/warehouses/ID?catalog=CAT&schema=SCH
BigQuerybigquery://PROJECT_ID/DATASET?keyFile=/path/to/key.json&location=US

Multi-Database Setup (TOML)

Connect to multiple databases simultaneously. Create a dbhub.toml file:

toml
[[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 = 5432database = "production"user = "dbuser"password = "secret"

Then run:

bash
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

bash
# Install dependenciespnpm install
# Run in development modepnpm dev
# Build for productionpnpm build
# Run testspnpm test

Credits

Built on top of DBHub by Bytebase, an open-source database DevSecOps platform. Licensed under MIT.

來源:README.md,提交 3888599

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分