Skip to Content
Tares

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:

  1. list_skills, then get_skill for a skill whose description matches the task.
  2. stats to see which values moved, and read for the entity’s timeline across the project’s sources.
  3. list_findings and project_timeline to see earlier conclusions.
  4. 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 as rca.

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 mcp

On an open instance there are no keys. Skip the key step and name the project in your prompts instead.

  1. Open the project and go to Settings, Keys.
  2. Choose New key and name it after the agent, for example claude-code.
  3. Copy the secret right away. It is shown once.
  4. Connect Claude Code with the key:
claude mcp add --transport http tares http://localhost:8788/mcp \ --header "Authorization: Bearer <project key>"
  1. Over stdio instead, start tares-mcp with TARES_AUTH_TOKEN set to the project key in its environment.
  2. 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.

  1. 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-server starts 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.

Still stuck? Get help

Last updated on