Connect an AI Agent
Connect your coding agent to Traceway and it can look into production for you: find what is failing, read the stack trace and the logs around it, see which endpoint got slow and when, and check who is on call. It can also instrument a new repository for you. It works with Claude Code, Cursor, Codex and every other client that speaks MCP (opens in a new tab).
Every Traceway instance serves an MCP server at /mcp, so there is nothing to install. The connection gives your agent read tools, a guide to the product, and the Traceway skills. It is read only. To let an agent change things, see Agent Write Access.
| What you do | How often | |
|---|---|---|
| 1 | Add the server to your MCP client | Once per client |
| 2 | Approve the connection in your browser | Once per client |
After that you ask your agent in plain language. The example prompts show what to type.
Step 1: Add the server to your MCP client
The client only needs the address of your instance followed by /mcp.
claude mcp add --transport http traceway https://cloud.tracewayapp.com/mcpReplace cloud.tracewayapp.com with your own host if you self-host.
Step 2: Approve the connection
The server does not answer until you have logged the client in. On the first connection the client opens your browser on Traceway's Authorize application page. In Claude Code you start this yourself: run /mcp, select traceway and choose Authenticate.
- Log in to Traceway if the page asks you to.
- Check that the page names the client you just added.
- Click Approve.
The browser returns to the client, which now holds a login of its own. It reads what you can read, in every project you are a member of, and it stays logged in for up to 90 days of inactivity.
Check that it works
Ask your agent something it can only answer from Traceway:
Which Traceway projects can you see?The agent calls the list_projects tool and answers with your project names. Then ask a real question:
What broke in checkout-api in the last 24 hours?With the remote server no project is selected, so name the project in your prompt, as above, or let the agent list your projects and ask you.
In Claude Code, /skills now lists traceway:traceway, traceway:traceway-learn and traceway:traceway-setup next to your other skills.
If the agent says it has no Traceway tools or gets an error, see When it fails.
The skills
The server hands your agent the Traceway skills along with the tools, through the MCP Skills extension (opens in a new tab). A skill is a playbook the agent loads when a task matches: the setup skill knows how every language and framework is instrumented, and the debugging skill knows how to follow an issue to its root cause.
| Skill | What it does | In Claude Code |
|---|---|---|
traceway-setup | Instruments a repository to report to Traceway. See Set Up with an Agent | /traceway:traceway-setup |
traceway | Debugs issues and slow endpoints to the root cause | /traceway:traceway |
traceway-learn | Answers how any part of Traceway works | /traceway:traceway-learn |
traceway-write | Configures alerting, SLOs, on-call and dashboards, and acts during incidents. Only on the write server | /traceway-write:traceway-write |
The prefix is the name you gave the server in step 1. You rarely need to type them: the agent picks a skill up when your request matches it.
When your agent does not list the skills
Skills over MCP are new, and not every client loads them yet. Claude Code does from version 2.1.331. Your agent still has every tool and the product guide. To give it the skills as well, install them as files with npx skills add tracewayapp/skills --all. Skills without MCP covers that install.
What your agent can read
| Area | What the agent can look up |
|---|---|
| Issues | Grouped exceptions in a time window, one issue with its stack trace and occurrences, a single occurrence |
| Logs | Log search by severity, service, text or trace id |
| Endpoints and tasks | p50, p95 and p99, request counts and impact per endpoint, latency over time, one endpoint's slowest requests, the span waterfall of a request or task run, and whether an endpoint is marked expected-slow |
| Traces, sessions and AI | A distributed trace across services and projects, the sessions of a time window, a session with the exceptions that happened in it, an AI trace with its conversation |
| Metrics and dashboards | Which metrics are recorded and their tags, metric series, the dashboards of a project and their JSON |
| Alerts | Alert rules with their enabled and snoozed state, notification channels, and what was sent |
| On-call | Pages and who was notified, who is on call now, teams, schedules, escalation policies, and your own contact methods and notification chains |
| Monitors and SLOs | Monitors and their incidents, SLO status, error budget and history, and a dry run of an SLO definition |
| Post-mortems | The post-mortem documents of a project |
| Remote SDK config | The remote SDK config rules of a browser, Flutter, iOS, Android or React Native project, and the settings a given client would get |
The agent can also explain Traceway itself. The server carries a product guide, so "how does paging escalate?" gets an answer from the guide and not a guess.
What it cannot do
- Change anything.
/mcpnever offers a write tool, whatever credential connects to it. Archiving issues, acknowledging pages, snoozing alerts and the rest need the write server. - Play a session replay. The agent gets the session and its exceptions. The replay stays in the dashboard.
- Use the rest of the dashboard API. A login made for an MCP client, like a personal access token, only reaches the routes the tools need. Everything else refuses it, so it cannot invite or remove members, change settings, or approve another login.
Example prompts
You type these as normal messages. The agent picks the tools and the skill.
Set up a repository
Set up Traceway in this repository.The agent loads the setup skill, shows you the projects it would create, and waits for your approval before it changes anything. Set Up with an Agent walks through it.
Something is broken
What broke in checkout-api in the last hour?The agent lists recent exceptions, error logs and the endpoints with the highest impact, and tells you what deserves attention.
Debug this issue and find the root cause:
https://cloud.tracewayapp.com/issues/3f9a1c2b7d4e5f60A dashboard URL, an issue hash, an error message or a description of the bug all work. The agent reads the latest occurrence, follows its trace across services and reads the logs of that trace.
I got this alert from Traceway. What is going on?
<paste the email, Slack message or webhook body>The agent takes the issue or the rule out of the notification and starts the matching investigation.
Something is slow
POST /api/checkout got slow this afternoon in checkout-api.
When did it start, and where is the time going?The agent measures the endpoint, finds the moment the latency changed, and opens the slowest requests to see which span costs the time.
Is p95 of GET /api/reports/export a problem, or is that
endpoint marked as expected-slow?On-call, monitors and SLOs
Who is on call for checkout-api right now, and are there open
pages?Are we meeting the checkout availability SLO? How much error
budget is left, and when did we burn most of it?Which monitors are down, and since when?How Traceway works
How does paging escalate when nobody acknowledges?Why is an endpoint shown as Critical on the Endpoints page?The agent answers these from the product guide, without touching your data.
Clients that support MCP prompts also list four ready-made investigation prompts, such as /mcp__traceway__debug_issue in Claude Code. The MCP Reference lists them.
Make changes with your agent
/mcp only reads. A second server at /mcp/write adds the tools that archive issues, acknowledge pages, snooze alerts and change SLOs, on-call and dashboards, plus the traceway-write skill. It needs a write login and an organization admin who turned on agent writes. Agent Write Access covers the setup.
Run it locally or in CI
- Without a browser, in CI or a container: connect with a read-only personal access token. See Tokens for CI and containers.
- On your machine with the CLI's login: the
tracewayCLI runs the same server on stdio withtraceway mcp. See Run the server locally.
The MCP Reference lists every tool, prompt and resource, and what to do when a connection fails.