Use with an LLM agent (MCP)
Connect an agent to the engine's MCP endpoint with an issued credential. It selects names from your catalog; the compiler is the only thing that touches the warehouse.
Updated
datahashi exposes the semantic layer to LLM agents over MCP. An agent grounds itself in your real metric and dimension names instead of guessing at a schema, and it emits the same Semantic Query object every other consumer does — so it cannot hallucinate a join, invent a column, or step around row-level security.
There is no separate, looser LLM path. The agent never sees SQL.
Connect
Point the MCP client at the engine:
https://<engine-host>/mcp
Authenticate with a credential the control plane issued — the same bearer token shape as the REST API:
Authorization: Bearer <your-api-key>
Workspace context and governance mode (governed or explore) come from the
token, not from anything the agent passes.
Tools
| Tool | REST equivalent | What it does |
|---|---|---|
list_catalog | GET /v1/catalog | the metrics and dimensions this principal may use |
describe_metric | GET /v1/describe | the definition and grain of one or more metrics, in one call |
run_semantic_query | POST /v1/query | run a query by naming metrics + dimensions |
(A list_models tool and a drill_down tool are on the roadmap, matching the
REST surface.)
Run a query
{
"tool": "run_semantic_query",
"arguments": {
"metrics": ["revenue"],
"dimensions": ["Order.region"],
"time_range": { "from": "2026-01-01", "grain": "month" }
}
}
There is no sql field. The agent names what it wants; the engine compiles,
applies policy, executes, and meters. If Order.region is not in this
principal’s catalog, the query fails here — not with a filtered-down result,
but with “you can’t ask that.”