How do I let my own Claude Code session investigate high latency with a project key?
Tares lets your own Claude Code session investigate high latency through a project key that you create under Settings, Keys and pass to claude mcp add as a Bearer header. The key reads that one project only, and any finding the session records lands on the project’s timelines under the key’s name. The full walkthrough is in Connect an outside agent to a project.
How it works
The project key ties your session to one Tares project, so the session works on your latency problem without seeing anything else.
- You create the key in the project and name it after the agent, for example
claude-code. Every finding the session records carries that name. - Claude Code connects to the Tares MCP endpoint with the key in an Authorization Bearer header. The project is implied, so the tools need no project argument.
- The key reads this project only and records findings in it. Any other call answers 403.
- During an investigation the session uses the project tools. It loads a matching skill with
list_skillsandget_skill, checks which values moved withstats, and reads the entity’s timeline across the project’s sources withread. - It then calls
list_findingsandproject_timelineto see what the Tares agents already concluded, so it builds on that work. - When it has an answer, it calls
record_findingwith the entity, a markdown finding and a one-word lowercase verdict such asrca.
Keys are checked only when the instance runs with auth, either tares up --auth or TARES_AUTH_TOKEN set. On an open instance there are no keys, so you skip the key step and name the project in your prompts.
Set it up
-
Start your Tares instance with auth and make sure the project has sources, ideally with a trigger on your latency signal. The AI SRE demo is a ready-made example.
-
Run the MCP endpoint, which serves
http://127.0.0.1:8788/mcp:tares mcp -
Open the project, go to Settings → Keys and choose New key. Name it after the agent that will hold it, such as
claude-code. -
Copy the secret straight away. It is shown once.
-
Connect Claude Code with the key:
claude mcp add --transport http tares http://localhost:8788/mcp \ --header "Authorization: Bearer <project key>"If you prefer stdio, start
tares-mcpwithTARES_AUTH_TOKENset to the project key in its environment. -
Check the connection from a Claude Code session:
Use tares: which project can you work in?
It calls
list_projectsand names the one project your key belongs to. -
Hand it the latency problem:
Use tares: api-server latency went up in the last 30 minutes. Check the project’s skills first, find which values moved, and record what you conclude.
The same steps work for any MCP client, such as Codex, Cursor or your own agent. Only the connect command differs.
What you get
- A Claude Code session that investigates latency inside your project, with the project’s sources and skills in reach.
- Context from the Tares agents. The session sees their earlier findings before it forms its own view.
- Findings you can find in three places. They appear as a card under What the agents found on the project’s Overview, under the key’s name. They appear as their own thread in Advanced setup’s Activity, marked as recorded from outside Tares. They also appear on the entity’s timeline in Explore, so the next Tares agent that reads
api-serverstarts from your conclusion. - A hard boundary. The key cannot reach other projects, so you can hand it to an agent without widening access.
To stop the access, revoke the key under Settings → Keys. Revoking also removes any subscriptions the key holds.
When something else fits
- If you want an agent that runs on its own, such as a service with a webhook, have it call
join_projectwith its URL. Tares then sends it every firing of every trigger in the project, so it does not wait for you to ask. - On an instance without auth there are no keys. Skip the key step and name the project in each prompt.
- For other clients, such as Codex or Cursor, the key and the project tools are the same. Follow the connect command for your client in the outside agent guide.
Related
- Connect an outside agent to a project
- How do I let my own Claude Code session investigate failed deploys with a project key?
- How do I let my own Claude Code session investigate error spikes with a project key?
- What does the root-cause agent receive when the triage agent hands off high latency?
Still stuck? Get help