npx claudepluginhub cliftonc/drizzle-cube-pluginClaude Code plugin for Drizzle Cube - type-safe analytics and dashboards with Drizzle ORM. Includes MCP tools, slash commands, and agent skills.
Share bugs, ideas, or general feedback.
A Claude Code plugin that provides MCP (Model Context Protocol) tools for interacting with Drizzle Cube semantic layer APIs.
This plugin registers two MCP servers for a complete Drizzle Cube integration:
| Tool | Description |
|---|---|
discover | Find relevant cubes by topic or natural language intent |
validate | Validate queries with auto-corrections |
load | Execute validated queries |
| Tool | Description |
|---|---|
drizzle_cube_meta | Fetch cube metadata (measures, dimensions, relationships) |
drizzle_cube_dry_run | Validate a query and preview generated SQL |
drizzle_cube_explain | Get query execution plan with performance analysis |
drizzle_cube_load | Execute a query directly via REST API |
drizzle_cube_batch | Execute multiple queries in parallel |
drizzle_cube_config | View current configuration status |
┌─────────────────────┐ ┌──────────────────────────────────┐
│ Claude Code │ │ Drizzle Cube Server │
│ │ │ │
│ MCP Servers: │ │ /mcp (MCP endpoint) │
│ - drizzle-cube-api ├────►│ - discover │
│ (HTTP to /mcp) │ │ - validate │
│ │ │ - load │
│ - drizzle-cube │ │ + prompts, resources │
│ (stdio plugin) │ │ │
│ - meta ├────►│ /cubejs-api/v1 (REST API) │
│ - dry_run │ │ - meta, dry-run, explain │
│ - explain │ │ - load, batch │
│ - load │ │ │
│ - batch │ └──────────────────────────────────┘
│ - config │
└─────────────────────┘
Why two servers?
/plugin install cliftonc/drizzle-cube-plugin
git clone https://github.com/cliftonc/drizzle-cube-plugin.git
cd drizzle-cube-plugin
npm install
npm run build
/plugin install ./drizzle-cube-plugin
The plugin works out of the box with the demo server at https://try.drizzle-cube.dev.
No configuration needed for the demo server. Just install and use:
/dc-ask "show me productivity by employee"
To use your own Drizzle Cube server, configure both the MCP server URL and REST API URL:
.mcp.json)The plugin's .mcp.json registers the real MCP server. Update the URL to point to your server:
{
"mcpServers": {
"drizzle-cube-api": {
"type": "url",
"url": "https://your-server.com/mcp"
},
"drizzle-cube": {
"command": "node",
"args": ["${CLAUDE_PLUGIN_ROOT}/dist/index.js"]
}
}
}
.drizzle-cube.json)Create .drizzle-cube.json in your project directory:
{
"serverUrl": "https://your-server.com",
"apiToken": "your-optional-token"
}
Or create a global config at ~/.drizzle-cube/config.json.
export DRIZZLE_CUBE_SERVER_URL="https://your-server.com"
export DRIZZLE_CUBE_API_TOKEN="your-token"
.drizzle-cube.json in current project directory~/.drizzle-cube/config.json (global)| Command | Description |
|---|---|
/dc-setup | Configure server URL and verify connectivity |
/dc-ask | Query data using natural language (AI-powered) |
/dc-query | Build queries with full schema awareness |
/dc-debug | Debug queries with SQL preview and execution plans |
/dc-create-cube | Create new cube definitions |
/dc-create-dashboard | Create dashboard configurations |
/dc-add-chart | Add charts to existing dashboards |
Ask questions in plain English:
/dc-ask "show me total revenue by product category for last month"
This uses the discover → validate → load workflow from the real MCP server.
When you know the cube structure:
/dc-query
This uses drizzle_cube_meta to show available cubes, then drizzle_cube_load to execute.
Preview the generated SQL without executing:
/dc-debug
This uses drizzle_cube_dry_run and drizzle_cube_explain for SQL preview and execution plans.