Connect your agents
An environment exposes four outputs. All four serve the same model, so the numbers match.
MCP (for AI agents)
The MCP server is the output built for agents, and it does something a data endpoint does not: it gives them the meaning before they query.
qontexta_get_model_context returns, in one call, every semantic view of a branch with each
metric’s business definition resolved back to the cube that defines it: what it
measures, what it leaves out, in what unit, how to read it, what the business calls
it and which questions it answers. Whatever nobody has described comes back flagged,
so the agent can say “this is not defined” instead of inventing a meaning.
Point your MCP client at:
https://mcp.qontexta.aiWhen you connect it, you log in to qontexta and authorise access. Queries run with your permissions: the token issued carries your identity and your role, so two people in the same tenant do not necessarily see the same thing.
The tools available:
| Tool | What it is for |
|---|---|
qontexta_get_model_context | The whole model with its meaning. Call this first. |
qontexta_list_domains, qontexta_describe_domain | Browse the business layer |
qontexta_list_cubes, qontexta_describe_cube | Where a number comes from |
qontexta_list_environments | Which environments exist and what they serve |
qontexta_query_metrics | Run the query |
Queries are written by naming members (revenue.total_amount), never SQL: the
aggregation, the joins and the exclusions are already in the definition, so there is
no way to get them wrong.
Semantic SQL (for BI)
An endpoint that speaks the Postgres wire protocol. Connect Tableau, Power BI, Metabase or any client that speaks Postgres, and query semantic views as if they were tables — without writing your Data Platform’s SQL.
Host and port are under Environments → Connect, and the token is the password.
REST and GraphQL
For your applications. The same definition, a different shape:
curl https://cube.qontexta.ai/cubejs-api/v1/load \
-H "Authorization: <YOUR_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"query": {
"measures": ["revenue.total_amount"],
"dimensions": ["revenue.region"],
"timeDimensions": [
{ "dimension": "revenue.order_date", "granularity": "month",
"dateRange": "last 12 months" }
]
}
}'About the tokens
Output tokens expire in hours and carry the tenant, the environment and the person
inside them. For a permanent integration, ask for a fresh one with your API key
against /api/v1/public/environments/:id/outputs rather than storing one.