Cube.js
MCP server from zsembek/Cube.js-MCP-server
claude mcp add --transport stdio zsembek-cube.js-mcp-server uvx --with cubejs-mcp-server @ git+https://github.com/zsembek/Cube.js-MCP-server.git python -m cubejs_mcp.server \ --env CUBEJS_API_TOKEN="your_api_token" \ --env CUBEJS_API_BASE_URL="http://localhost:4000/cubejs-api/v1"
How to use
This MCP server exposes Cube.js analytics capabilities via the Model Context Protocol, enabling AI assistants and applications to discover available cubes, their measures and dimensions, and to execute analytics queries against Cube.js. Two core tools are provided: a cube discovery function and a query function. The discovery tool lists all cubes with their metadata, including measures, dimensions, and segments, which helps clients understand the data landscape before constructing queries. The query tool executes analytics against a specified cube, allowing you to specify measures, dimensions for grouping, and optional filters to refine results. The server is built on FastMCP for asynchronous handling and supports token-based authentication to protect access to your Cube.js instance.
How to install
Prerequisites:
- Python 3.8 or higher
- Access to a Cube.js instance (hosted locally or remotely)
- Python package manager (pip)
Installation steps:
- Clone the repository:
git clone https://github.com/zsembek/Cube.js-MCP-server.git
cd Cube.js-MCP-server
- Install Python dependencies:
pip install -r requirements.txt
- Set up environment variables:
cp .env.example .env
Edit .env with your Cube.js configuration, for example:
CUBEJS_API_BASE_URL=http://localhost:4000/cubejs-api/v1
CUBEJS_API_TOKEN=your_api_token_here
- Run the server (as described in this project, the recommended approach is via uvx in Claude integration):
# Use the recommended CLI entry point for local testing or integration scripts
python server.py
Additional notes
- Ensure CUBEJS_API_BASE_URL points to your Cube.js API endpoint and that CUBEJS_API_TOKEN is set if your Cube.js instance requires authentication.
- For Claude or other MCP clients, you can integrate using the provided configuration snippet under Claude Configuration in the README to launch the server automatically.
- The environment variables can be managed by your deployment platform; avoid committing tokens to version control.
- If you encounter connection or authentication errors, verify the Cube.js API is reachable from the MCP server host and that the token (if required) is valid.
- The server supports async query handling; long-running queries will be processed without blocking clients. Consider increasing timeouts if your Cube.js queries are large.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP