MCP Server
TracePath serves MCP (opens in a new tab) as a remote server at https://app.tracepath.dev/mcp, with OAuth login built in and nothing to install. MCP clients like Claude Code, Claude Desktop, and Cursor can investigate your production errors, logs, latency, and metrics directly.
Connecting
Point any streamable-HTTP MCP client at it and the client handles login itself:
# Claude Code
claude mcp add --transport http tracepath https://app.tracepath.dev/mcpOn first use the client discovers the OAuth metadata, registers itself (RFC 7591 (opens in a new tab) dynamic client registration), and opens your browser on the TracePath consent page. Approve, and the client holds a short-lived access token plus a rotating refresh token. Nothing is installed and nothing is configured on the host.
The connection carries your own permissions. An MCP client signed in as you sees exactly the projects you see, and no more.
Headless use (CI, containers)
Where no browser is available, send a personal access token directly:
Authorization: Bearer tpp_...on every request to https://app.tracepath.dev/mcp. Create the token under an account whose project role is already limited to reading, so a CI agent cannot archive anything.
What to expect
- No default project. Pass
project_idon each call, or let the model calllist_projectsfirst. - Unauthenticated requests get a
401with aWWW-Authenticatechallenge pointing at/.well-known/oauth-protected-resource/mcp, which is how spec-compliant clients find the login flow. - CORS preflights are answered on both the discovery documents and
/mcp, so browser-based clients such as the MCP Inspector auth debugger can reach them.
A local stdio server (tracepath mcp) is part of the CLI, which
is not distributed yet. The remote server above needs no binary and is the way
to connect today.
Tools
Every tool wraps one API call and declares an output schema, so results come back as validated structuredContent alongside the JSON text. All read tools are annotated read-only; only the two archive tools mutate anything, and their descriptions instruct agents to use them solely on explicit request.
| Tool | Purpose |
|---|---|
list_projects | Projects you can access (also the auth smoke check) |
list_exceptions | Grouped exceptions in a window |
get_exception | One group by hash: stack trace + occurrences |
get_exception_occurrence | One occurrence by id |
query_logs | Log search (severity, service, text, trace id) |
list_endpoints | Per-endpoint p50/p95/p99, counts, impact |
get_endpoint_request | One request: span waterfall + linked errors |
endpoints_chart | Latency over time (find when it changed) |
get_slow_endpoint_config | Operator-accepted latency baseline |
query_metrics | Time-bucketed metric series |
get_task / get_ai_trace / get_session / get_trace | By-id detail lookups |
archive_exceptions / unarchive_exceptions | The only mutating tools |
Project selection is per call: every project-scoped tool accepts a project_id parameter. Start a session with list_projects to get the ids.
The by-id detail tools require the record's timestamp (recorded_at, or started_at for sessions) so lookups stay partition-pruned and fast. The tool descriptions teach agents where to recover it: the ?t= param in a dashboard URL, an occurrence list, or the Occurred at line in a notification.
Prompts and resources
The debugging knowledge lives in the server, not in the client:
- Prompts:
debug_issue,investigate_performance,whats_broken, andresolve_notificationrender the full investigation playbooks with your argument inlined. - Resources:
tracepath://knowledge/*documents cover the debug flow, the performance bottleneck checklist, dashboard URL resolution, timestamp recovery, and notification handling.
An agent that reads the resources before it starts asks far fewer wrong questions, so point your client at them in its system prompt if it does not fetch resources on its own.
Errors
Tool errors carry stable error codes in the text, formatted as error=<code>: <message>. Hint: <hint>, so agents can branch on token_expired, not_found, rate_limited, no_project, and friends.