How do I let my own Claude Code session investigate error spikes with a project key?
Tares lets your own Claude Code session investigate error spikes in one project when you give it a project key and connect it over MCP. You create the key under Settings, Keys, then register the MCP endpoint with claude mcp add and an Authorization Bearer header. The key reads that project only and records findings there, so your conclusions land next to what the Tares agents already found.
How it works
A project key ties one outside agent to one project. Once Claude Code connects with it, the project is implied, so the tools need no project argument.
- The key can read the project’s sources and see the project’s skills.
- The key can see earlier findings and the project timeline, so your session builds on what Tares agents already concluded.
- The key can record its own findings. Each one carries the key’s name, which is why you name the key after the agent.
- Any call outside that scope answers 403.
During an error spike, Claude Code works through the project tools in this order:
list_skills, thenget_skillfor a skill whose description matches the task.statsto see which values moved, andreadfor the entity’s timeline across the project’s sources.list_findingsandproject_timelineto see earlier conclusions.record_finding(entity, finding, verdict)to write the result. The entity is what the finding is about, the finding is markdown, and the verdict is one lowercase word such asrca.
The full walkthrough is in Connect an outside agent to a project.
Set it up
You need a running Tares instance with a project that has sources and a trigger, such as the demo in AI SRE. Start the instance with auth on, so keys are checked, and run the MCP endpoint, which serves http://127.0.0.1:8788/mcp.
tares mcpOn an open instance there are no keys. Skip the key step and name the project in your prompts instead.
- Open the project and go to Settings, Keys.
- Choose New key and name it after the agent, for example
claude-code. - Copy the secret right 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>"- Over stdio instead, 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?
Claude Code calls list_projects and names the one project the key belongs to.
- Point it at the spike:
Use tares: errors on api-server jumped in the last 30 minutes. Check the project’s skills first, find which values moved, and record what you conclude.
To stop the session from reaching the project, revoke the key under Settings, Keys.
What you get
- Your own Claude Code session investigates an error spike with the same project sources and skills the Tares agents use.
- It starts from earlier findings instead of repeating them.
- Its conclusion shows as a card under What the agents found on the project’s Overview, under the key’s name.
- In Advanced setup’s Activity, the finding is a thread of its own, marked as recorded from outside Tares.
- The finding also sits on the entity’s timeline in Explore, so the next Tares agent that reads
api-serverstarts from it. - The key’s reach is limited to one project, so a leaked key exposes nothing else.
When something else fits
- If you want an agent that runs on its own when a trigger fires, such as a service with a webhook, have it join the project with
join_project(url). Every firing of every trigger in the project is then sent to that URL. - If you use Codex, Cursor or your own agent, the same key and steps apply. Only the connect command differs, and Connecting agents lists each client.
Related
- Connect an outside agent to a project
- How do I let my own Claude Code session investigate high latency with a project key?
- How do I let my own Claude Code session investigate failed deploys with a project key?
- What does the root-cause agent receive when the triage agent hands off error spikes?
Still stuck? Get help