Agents now connect to datahashi over OAuth — scoped tokens, no API keys to paste
datahashi
Open console
← Docs

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

ToolREST equivalentWhat it does
list_catalogGET /v1/catalogthe metrics and dimensions this principal may use
describe_metricGET /v1/describethe definition and grain of one or more metrics, in one call
run_semantic_queryPOST /v1/queryrun 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.”