{
  "markdown": "<p align=\"center\">\n  <h1 align=\"center\">DBHub Analytics</h1>\n  <p align=\"center\">Universal Database MCP Server for Databricks, Google BigQuery, PostgreSQL, MySQL, SQL Server, SQLite, MariaDB</p>\n</p>\n\n[![npm version](https://img.shields.io/npm/v/dbhub-analytics)](https://www.npmjs.com/package/dbhub-analytics)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n> Built on top of [DBHub](https://github.com/bytebase/dbhub) by [Bytebase](https://www.bytebase.com/).\n\n## What is DBHub Analytics?\n\nDBHub Analytics is an open-source [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) 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.\n\n```\n            +------------------+    +--------------+    +------------------+\n            |                  |    |              |    |                  |\n            |  Claude Desktop  +--->+              +--->+    PostgreSQL    |\n            |                  |    |              |    |                  |\n            |  Claude Code     +--->+              +--->+    SQL Server    |\n            |                  |    |    DBHub     |    |                  |\n            |  Cursor          +--->+   Analytics  +--->+    SQLite        |\n            |                  |    |              |    |                  |\n            |  VS Code         +--->+              +--->+    MySQL         |\n            |                  |    |              |    |                  |\n            |  Copilot CLI     +--->+              +--->+    MariaDB       |\n            |                  |    |              |    |                  |\n            |                  |    |              +--->+    Databricks    |\n            |                  |    |              |    |                  |\n            |                  |    |              +--->+    BigQuery      |\n            |                  |    |              |    |                  |\n            +------------------+    +--------------+    +------------------+\n                 MCP Clients           MCP Server             Databases\n```\n\n## Key Features\n\n- **Cloud Data Warehouses**: Connect to Databricks SQL and Google BigQuery for analytics workloads\n- **Traditional Databases**: Full support for PostgreSQL, MySQL, MariaDB, SQL Server, SQLite\n- **Multi-Database**: Connect to multiple databases simultaneously with a single TOML config file\n- **Schema Explorer**: Progressive disclosure — browse catalogs, datasets, schemas, tables, and columns\n- **Safety Guardrails**: Read-only mode, row limits, and query timeouts to prevent runaway operations\n- **Secure Access**: SSH tunneling, SSL/TLS encryption, and service account authentication\n- **Zero Config**: Just provide a DSN — no drivers to install, no complex setup\n\n## Supported Databases\n\n| Database | DSN Protocol | Status |\n|----------|-------------|--------|\n| PostgreSQL | `postgres://` | Stable |\n| MySQL | `mysql://` | Stable |\n| MariaDB | `mariadb://` | Stable |\n| SQL Server | `sqlserver://` | Stable |\n| SQLite | `sqlite:///` | Stable |\n| Databricks SQL | `databricks://` | Stable |\n| Google BigQuery | `bigquery://` | Stable |\n\n## MCP Tools\n\n| Tool | Description |\n|------|-------------|\n| `execute_sql` | Execute SQL queries with read-only enforcement and row limiting |\n| `search_objects` | Browse catalogs, schemas, tables, columns, indexes, and routines |\n| Custom Tools | Define reusable, parameterized SQL queries in `dbhub.toml` |\n\n## Quick Start\n\n### NPM (recommended)\n\n```bash\nnpx dbhub-analytics --dsn \"postgres://user:password@localhost:5432/dbname\"\n```\n\n### Databricks SQL\n\n```bash\nnpx dbhub-analytics --dsn \"databricks://token:YOUR_TOKEN@your-workspace.cloud.databricks.com/sql/2.0/warehouses/your_warehouse_id\"\n```\n\n### Google BigQuery\n\n```bash\nnpx dbhub-analytics --dsn \"bigquery://your-gcp-project/your_dataset?keyFile=/path/to/service-account.json&location=US\"\n```\n\n### Docker\n\n```bash\ndocker run --rm --init \\\n   --name dbhub-analytics \\\n   --publish 8080:8080 \\\n   amansingh63/dbhub-analytics \\\n   --transport http \\\n   --port 8080 \\\n   --dsn \"postgres://user:password@localhost:5432/dbname\"\n```\n\n### Demo Mode\n\n```bash\nnpx dbhub-analytics --demo\n```\n\n## Connect to Your AI Assistant\n\n### Claude Desktop / Claude Code\n\nAdd to your `claude_desktop_config.json` or `.mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"dbhub-analytics\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"dbhub-analytics\", \"--dsn\", \"bigquery://your-project/your_dataset?keyFile=/path/to/sa.json&location=US\"]\n    }\n  }\n}\n```\n\n### GitHub Copilot (VS Code)\n\nAdd to your `.vscode/mcp.json`:\n\n```json\n{\n  \"servers\": {\n    \"dbhub-analytics\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"dbhub-analytics\", \"--dsn\", \"postgres://user:pass@localhost:5432/dbname\"]\n    }\n  }\n}\n```\n\n### Cursor\n\nAdd to your Cursor MCP settings (`~/.cursor/mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"dbhub-analytics\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"dbhub-analytics\", \"--dsn\", \"databricks://token:YOUR_TOKEN@host/sql/2.0/warehouses/ID\"]\n    }\n  }\n}\n```\n\n### Windsurf\n\nAdd to your Windsurf MCP config (`~/.codeium/windsurf/mcp_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"dbhub-analytics\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"dbhub-analytics\", \"--dsn\", \"mysql://user:pass@localhost:3306/dbname\"]\n    }\n  }\n}\n```\n\n### Multi-Database via TOML Config\n\nFor connecting to multiple databases, use a TOML config file with any of the above clients:\n\n```json\n{\n  \"mcpServers\": {\n    \"dbhub-analytics\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"dbhub-analytics\", \"--config\", \"/path/to/dbhub.toml\"]\n    }\n  }\n}\n```\n\n## Configuration\n\n### DSN Connection Strings\n\n| Database | Format |\n|----------|--------|\n| PostgreSQL | `postgres://user:pass@host:5432/dbname?sslmode=require` |\n| MySQL | `mysql://user:pass@host:3306/dbname` |\n| MariaDB | `mariadb://user:pass@host:3306/dbname` |\n| SQL Server | `sqlserver://user:pass@host:1433/dbname` |\n| SQLite | `sqlite:///path/to/file.db` or `sqlite:///:memory:` |\n| Databricks | `databricks://token:TOKEN@host/sql/2.0/warehouses/ID?catalog=CAT&schema=SCH` |\n| BigQuery | `bigquery://PROJECT_ID/DATASET?keyFile=/path/to/key.json&location=US` |\n\n### Multi-Database Setup (TOML)\n\nConnect to multiple databases simultaneously. Create a `dbhub.toml` file:\n\n```toml\n[[sources]]\nid = \"databricks_prod\"\ntype = \"databricks\"\nhost = \"adb-xxx.azuredatabricks.net\"\npassword = \"dapi...\"\npath = \"/sql/2.0/warehouses/abc123\"\n\n[[sources]]\nid = \"bigquery_analytics\"\ntype = \"bigquery\"\nproject = \"my-gcp-project\"\ndatabase = \"analytics_dataset\"\nlocation = \"US\"\n\n[[sources]]\nid = \"postgres_prod\"\ntype = \"postgres\"\nhost = \"localhost\"\nport = 5432\ndatabase = \"production\"\nuser = \"dbuser\"\npassword = \"secret\"\n```\n\nThen run:\n\n```bash\nnpx dbhub-analytics --config dbhub.toml\n```\n\nSee [Multi-Database Configuration](https://dbhub.ai/config/toml) and [Command-Line Options](https://dbhub.ai/config/command-line) for complete documentation.\n\n## Use Cases\n\n- **Data Analysts**: Ask Claude to query your Databricks or BigQuery data warehouse in natural language\n- **Backend Engineers**: Explore database schemas, run diagnostic queries, and debug issues via AI\n- **DevOps/SRE**: Connect to production read-replicas safely with read-only mode and row limits\n- **Data Scientists**: Query multiple databases simultaneously — join insights across PostgreSQL and BigQuery\n\n## Development\n\n```bash\n# Install dependencies\npnpm install\n\n# Run in development mode\npnpm dev\n\n# Build for production\npnpm build\n\n# Run tests\npnpm test\n```\n\n## Credits\n\nBuilt on top of [DBHub](https://github.com/bytebase/dbhub) by [Bytebase](https://www.bytebase.com/), an open-source database DevSecOps platform. Licensed under MIT.\n",
  "bytes": 7968,
  "sha": "5f7e76c5f07ec66badabf1eb09c263fc0e59451314f4bb773ecef4b5e76e903e",
  "repo_slug": "amansingh63/dbhub-analytics",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_amansingh63_dbhub_analytics_b27c64ac/readme"
}