cube
MCP server from cubedevinc/cube-mcp-server
claude mcp add --transport stdio cubedevinc-cube-mcp-server npx @cube-dev/mcp-server \
--env CUBE_API_KEY="your_api_key_here" \
--env EXTERNAL_USER_ID="user-123" \
--env INTERNAL_USER_ID="analyst@yourcompany.com" \
--env CUBE_CHAT_API_URL="https://ai.{cloudRegion}.cubecloud.dev/api/v1/public/{accountName}/agents/{agentId}/chat/stream-chat-state"How to use
Cube MCP Server provides a real-time chat-enabled analytics assistant built on Cube's AI agent. It exposes a chat tool that streams responses from the Cube AI agent for analytics, data exploration, and interactive querying. The server authenticates with Cube via API key and uses a streaming Chat API URL to deliver live, stateful conversations. Use the chat tool to ask questions like revenue trends, top products, or exploratory data queries, and receive real-time analytics, visualizations, and SQL guidance as part of the response stream.
How to install
Prerequisites:
- Node.js installed (recommended version compatible with npx usage)
- Internet access to fetch @cube-dev/mcp-server from npm registry
Installation steps:
-
Ensure Node.js and npm are installed on your system.
-
Create a working directory for your MCP configuration, or use an existing one.
-
Prepare the mcp configuration file (see mcp_config in this document) and save it as, for example, cube-mcp.config.json.
-
Start the MCP server via npx using the provided configuration. Example:
npx @cube-dev/mcp-server --config cube-mcp.config.json
-
Verify the server starts and the MCP client can connect using the configured mcpServers entry. If using internal or external user IDs, ensure the CUBE_CHAT_API_URL and CUBE_API_KEY are correctly set in the environment for authentication.
Notes:
- Replace placeholder values in the environment variables with your actual Cube instance details and credentials.
- Ensure network access to the Cube API URL from the host running the MCP server.
Additional notes
Tips and common issues:
- Ensure CUBE_CHAT_API_URL is the full endpoint URL for your agent's chat stream API as shown in the Cube admin panel.
- Use CUBE_API_KEY with appropriate permissions to access the agent's chat API.
- Choose the appropriate user identity by configuring either INTERNAL_USER_ID or EXTERNAL_USER_ID: INTERNAL uses existing Cube user permissions; EXTERNAL allows custom identifiers for external users.
- If you encounter authentication errors, double-check API key validity and that the agent URL matches your Cube cloud region and account.
- The chat tool streams responses; ensure your client/parser handles streaming data to present incremental results.
- You can switch between internal and external user configurations by setting only the relevant env variable in your deployment.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.