• ACCURACY
  • DISCOVERY
  • AUTOMATION
  • HUMAN

How to query semantic layer metrics with your AI

Connect Cube.dev once to give your AI access to your governed metric definitions. From there, your agent handles the heavy lifting of translating natural language into precise data queries.

Ask AI about this page

Short answer

Can my AI pull metrics from Cube.dev?

Yes. Your AI client uses the semantic layer to fetch specific measures and dimensions you've already defined. This ensures the numbers your agent reports match your official business logic.

The results of a connection.

Where your data insights land.

Once the connection is live, your AI moves from guessing at data to querying verified definitions.

ACCURACY

Governed metric retrieval

The AI uses your existing Cube measures instead of calculating values on the fly. You get consistent numbers every time.

DISCOVERY

Schema awareness

Your agent explores available dimensions and measures to understand what data is actually available for a question. It knows the structure of your semantic layer.

AUTOMATION

Direct query execution

The AI generates and runs the necessary queries to pull specific datasets. It handles the translation from English to the semantic query language.

HUMAN

Logic verification

If a request falls outside your defined semantic layer, the AI stops. You decide how to extend the schema or adjust the request.

The workflow

What your AI does when a question arrives.

The AI follows a specific loop to ensure it doesn't hallucinate metrics or use incorrect logic.

  1. Explore the schema

    The agent first looks at your Cube model to see which dimensions and measures are available to answer your specific request.

    list_entities
  2. Inspect metadata

    It checks the specific properties of the requested metrics to ensure the query structure is valid.

    get_meta
  3. Execute the query

    The AI builds the semantic query and sends it to Cube to pull the actual data points.

    load_query
  4. Format the answer

    The agent takes the raw data returned from the semantic layer and presents it in a readable format.

    load_query

Try it

Copy these to start.

Use these prompts to begin interacting with your Cube data.

Starting points

Replace the bracketed text with your specific Cube model names or metric identifiers.

Cube.dev Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_umZADPejupUUQHrfZkQT0lvv7MlK4j1JkrhOJOMy/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Cube.dev capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "cubedev-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_umZADPejupUUQHrfZkQT0lvv7MlK4j1JkrhOJOMy/mcp"
    }
  }
}
Copy into chat04
  • List all the available measures in my 'sales_performance' cube.

  • What dimensions can I use to filter the 'user_engagement' metrics?

  • Query the total revenue for the last quarter using the 'orders' cube.

  • Show me the monthly active users trend for the 'subscription_metrics' model.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Cube.dev once, then ask.

Just provide your Cube credentials. Vinkius manages the connection securely, and you can immediately start chatting with your data in your preferred AI client.

Connect Cube.dev to your AI

FAQ

How this task behaves.

  • 01

    Can the AI change my Cube metric definitions?

    No. The AI can only read and query the definitions you have already established in your semantic layer.

  • 02

    Does the AI write raw SQL?

    No. It interacts with the Cube semantic layer using defined measures and dimensions, not by writing direct SQL against your database.

  • 03

    What happens if I ask for a metric that isn't in Cube?

    The AI will tell you it cannot find that metric. It only knows what is explicitly defined in your semantic layer.

  • 04

    Can the AI delete data in my warehouse?

    No. This MCP only has tools to list entities, get metadata, and load queries. It cannot perform write or delete operations.

  • 05

    How does the AI know which dimensions to use?

    It uses the list_entities and get_meta tools to inspect your Cube model before it attempts to build a query.

  • More questions about Cube.dev? The Connector page answers them. See everything the Cube.dev Connector can do

Connect Cube.dev to Claude, Cursor, ChatGPT & more