AI Copilot (MCP)
oriel mcp serves a read-only Model Context Protocol
surface over stdio, so an AI agent can investigate your telemetry with the same
reads the UI uses: OQL queries, field discovery, traces, the service map, and SLO
and alert state. It is a thin client of a running query server, authenticated by
an API token, so it only ever performs read operations and inherits the token’s
workspace scope and the server’s query budgets.
Run the server
Section titled “Run the server”The server reads its token from ORIEL_TOKEN (an environment variable, never a
flag, so the secret stays out of process lists). Mint one scoped to the tools you
want, then point a client at the command:
oriel admin token --workspace demo \ --permissions telemetry:query,slos:read,alerts:readexport ORIEL_TOKEN=orl_...oriel mcp --api https://oriel.example.com --workspace demo| Flag | Default | Description |
|---|---|---|
--api |
http://127.0.0.1:6743 |
Base URL of the query API. Also ORIEL_API. |
--workspace, -w |
Default workspace slug. Omit to resolve it from the token. Also ORIEL_WORKSPACE. |
Most MCP clients launch the server themselves; give them the command and the token in the environment:
{ "mcpServers": { "oriel": { "command": "oriel", "args": ["mcp", "--api", "https://oriel.example.com"], "env": { "ORIEL_TOKEN": "orl_..." } } }}| Tool | Returns |
|---|---|
oriel_scopes |
The visible workspaces, or one workspace’s projects with their environments and services. |
oriel_query |
OQL result frames over spans, traces, logs, metrics, or profiles. |
oriel_fields |
The field keys of a source, or the observed values of one key. |
oriel_trace |
Every span of a trace by hex id, with a span, error, and service summary. |
oriel_service_map |
Service dependency edges with call counts, error counts, and p95 latency. |
oriel_slos |
Each SLO with its objective, SLI, budget remaining, burn rate, and firing burn-rate alerts. |
oriel_alerts |
The workspace’s alert rules and the current alert instances and their state. |
An agent typically starts at oriel_scopes to learn the slugs, narrows with
oriel_fields, then runs oriel_query and follows exemplars into oriel_trace.
Guardrails
Section titled “Guardrails”- Read-only. Only read endpoints are wired as tools; there is no path to a write through the MCP server.
- Scoped. Every tool acts as the token: a token is bound to one workspace,
and the query API authorizes
telemetry:query(andslos:read/alerts:readfor those tools) on each read. - Bounded. A tool with no time range defaults to the last hour rather than scanning all of retention, the server’s scan budgets and query deadline still apply, and each tool’s output is capped so a wide result cannot exhaust the agent’s context. Narrow the scope, shorten the window, or add an OQL filter when a result is truncated.