DB-MCP Server

Provides governed semantic analytics by exposing Cube.js tools as MCP endpoints to enable safe natural language queries over your data warehouse.
  • typescript

0

GitHub Stars

typescript

Language

2 months ago

First Indexed

3 weeks ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "anupom-db-mcp": {
      "command": "node",
      "args": [
        "/path/to/db-mcp/dist/index.js"
      ],
      "env": {
        "MAX_LIMIT": "1000",
        "CUBE_API_URL": "http://localhost:4000/cubejs-api/v1",
        "DENY_MEMBERS": "Users.email,Users.ssn",
        "CUBE_JWT_SECRET": "your-secret-min-32-chars"
      }
    }
  }
}

DB-MCP is an MCP server that exposes Cube.js semantic analytics capabilities as governed MCP tools, enabling natural language queries over your data warehouse while enforcing governance policies like query limits and PII blocking. It acts as a safe bridge between AI assistants and your Cube.js semantic layer, allowing AI models to request analytics in a controlled, auditable way.

How to use

You will run the MCP server locally or in your infrastructure and connect an MCP-compatible client or AI assistant to it. The server exposes three core tools you can invoke: catalog.search to explore available measures, dimensions, and segments; catalog.describe to retrieve details about a specific member; and query.semantic to execute governed queries against the semantic layer. Governance rules enforce limits, block sensitive data, and validate member access as requests flow through the system.

How to install

Prerequisites: ensure you have Node.js installed on your system. You will also need Docker if you want to start infrastructure components via containerization, though the MCP server itself runs with Node.js.

Step 1: Install and build the MCP server dependencies.

# Install project dependencies
npm install

# Build the MCP server
npm run build

Step 2: Start the Admin UI components if you want the management UI. This includes starting the admin backend and frontend tools.

# Start admin backend (port 3000)
cd admin/backend && npm install && npm run dev

# Start admin frontend (port 3001)
cd admin/frontend && npm install && npm run dev

Additional setup notes

Configure the server by copying the example environment file and adjusting the values to your environment. The configuration controls how the MCP server connects to Cube.js and how governance rules are applied.

Available tools

catalog.search

Search available measures, dimensions, and segments in the Cube.js semantic layer to discover what analytics are accessible via MCP tools.

catalog.describe

Retrieve detailed metadata about a specific member (measure, dimension, or segment) from the Cube.js schema.

query.semantic

Execute governed semantic queries against the Cube.js layer, respecting governance policies like limits and PII blocking.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational