Connect an AI agent
Let Claude, ChatGPT, Cursor, VS Code, or another MCP client read traces, logs, and usage from one workspace.
telemetry.dev runs an MCP server at https://telemetry.dev/mcp. An AI agent connected to it can find traces, read a trace’s spans and errors, list logs, and summarize token usage and cost, so you can ask questions such as “why did the last checkout run fail?” in your editor or chat app.
The server is read-only. An agent cannot change projects, settings, keys, or telemetry.
To read the same data from a terminal, a script, or an agent that can’t use an MCP client, use the telemetry command line.
Connect a client
Add the server URL to your client. The client opens telemetry.dev in your browser the first time it calls the server.
claude mcp add --transport http telemetry https://telemetry.dev/mcp{
"mcpServers": {
"telemetry": { "url": "https://telemetry.dev/mcp" }
}
}{
"servers": {
"telemetry": { "type": "http", "url": "https://telemetry.dev/mcp" }
}
}In Claude on the web or desktop, and in ChatGPT, add a custom connector with the URL https://telemetry.dev/mcp.
Then approve the connection in the browser:
Sign in
Sign in to telemetry.dev, or create an account. A new account needs a verified email before it can connect; the verification link brings you back to the connection.
Choose a workspace
If you belong to more than one workspace, choose the one the agent can read. A connection reads one workspace. To give an agent another one, connect it again.
Approve
Check what the agent will be able to read and select Allow. telemetry.dev asks every time you connect, even for an app you approved before.
If the page says telemetry.dev has not verified this app, the app’s name was chosen by whoever registered it. Only select Allow if you just started the connection yourself.
What an agent can read
| Tool | What it returns |
|---|---|
list_projects |
The workspace’s projects. Every other tool needs a project from this list. |
search_sessions |
Sessions with traces in a time window, newest first, with trace count, errors, tokens, and cost. |
search_traces |
Traces in a time window, newest first, filtered by name, status, environment, framework, service, session, or end user, or by the model, provider, operation, agent, or tool of one of their spans. The tool filter matches a tool call by its recorded tool name, or by the span name when there is none. |
get_trace |
One trace’s spans with models, tools, timing, tokens, cost, and error text, and its logs, in pages. Next to its cost_usd, each span has input_cost_usd, cache_read_cost_usd, cache_write_cost_usd, reasoning_cost_usd, and output_cost_usd, which add up to it; they are null for a span without this split, such as one whose cost the SDK reported. Read Cost by token class. It also returns trace.url, the trace’s page in the dashboard, so an agent can give you a link to the run. |
get_span_payload |
The captured input, output, or error of one span, in pages. Needs the extra permission below. |
list_logs |
Log records in a time window, newest first, filtered by level, with counts per level for the whole window. |
get_usage_summary |
Requests, errors, latency, tokens, cost, and active users for 7, 30, or 90 days, compared with the period before, broken down by model, provider, end user, or operation. The breakdown lists the top 6 groups by requests. |
Every tool reads only within the project’s retention period. A single result holds at most 40,000 characters.
Time windows
search_traces, search_sessions, and list_logs take since and until. Each is a duration before now, such as 30m, 2h, or 7d, or an RFC 3339 time with Z or an offset, such as 2026-10-30T14:00:00Z. The window includes since and excludes until. Without them, search_traces searches the whole retention period, search_sessions the last 24 hours, and list_logs the last 7 days.
The server resolves a duration against its own clock. A since before the retention period starts at the start of it, and an until in the future ends now. Each result has a window with the times it read, for example:
"window": {
"since": "2026-10-30T12:00:00.000Z",
"until": "2026-10-30T14:00:00.000Z",
"capped_by_retention": false
}
capped_by_retention is true when the window starts at the start of the retention period, so older data was not read. The older range_hours and range_days arguments still work, but not together with since or until. A window the server can’t read, such as one that ends before the retention period, returns an error that says what to change.
Pages
While a result’s next_cursor is not null, pass it as cursor to get the next page. The cursor keeps the window of the first page, so a duration such as 2h covers the same two hours on every page. Pass the same other arguments as the call that returned the cursor; only limit can change. A cursor from a call with other arguments returns an error.
search_sessions lists sessions by the start of their latest trace in the window. A trace that started before the window ended but reached telemetry.dev after the first page was read can move its session to a page already read, so a session can be missed or listed twice. list_logs counts levels over the whole window on every page, so a late log can change the counts between pages.
Errors
Each tool that takes arguments refuses one that it does not know, so a misspelled filter returns an error instead of results without that filter.
A tool error has a text that the agent reads and, for a client that acts on it, a code in _meta:
"_meta": { "dev.telemetry/error": { "code": "invalid_cursor", "retryable": false } }
The codes are invalid_cursor, payloads_not_allowed, access_denied, project_not_found, trace_not_found, span_not_found, not_found, invalid_arguments, plan_limit, and server_error. Only server_error is retryable. An argument that fails the tool’s input schema returns an error without a code, so treat a missing code as unknown.
Usage reads that fail
get_usage_summary still answers when one of its reads fails. data_incomplete is true when any read failed, such as the read of the period before. current_unavailable is true when the totals of the range were not read, and breakdown_unavailable is true when the breakdown was not read. In those cases the zeros in current, or the empty breakdown, are not data, so read them as unknown rather than as no usage.
Prompts and outputs
By default an agent cannot read captured prompts, model outputs, or tool arguments. To allow it, check Also read captured prompts, outputs, and tool arguments when you approve. A previous grant can leave this checked; you can uncheck it before approving.
If an agent calls get_span_payload without that permission, the tool returns an error explaining how to grant it. The server does not send an OAuth reapproval challenge, and the other tools remain available. The agent can continue investigating span status, timing, and error text without reading captured payloads.
If you need payload access later, sign in to telemetry.dev again from your client, check Also read captured prompts, outputs, and tool arguments, and select Allow. In Claude Code, run /mcp, select the telemetry server, then Re-authenticate. Its Reconnect option keeps the current permission and does not show the approval page. In apps without a sign-in option, disconnect telemetry.dev and connect it again. Signing in again may interrupt access until you approve, so do it when you are ready.
Without the permission, an agent still reads error messages and log messages. Those can contain text from your users or from your prompts.
What an agent reads goes to the client and its model provider. The telemetry was written by your users, models, and tools, so it can contain instructions. The server tells agents to treat it as data, but an agent can still be misled by it.
Disconnect an agent
Open your user menu and select Account. Under Connected apps, select Disconnect next to the app, then confirm.
The app loses access right away. To use it again, connect it again from the app.
An agent also loses access when you leave the workspace or the workspace is deleted.