Skip to Content
Tares

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_skills and get_skill, checks which values moved with stats, and reads the entity’s timeline across the project’s sources with read.
  • It then calls list_findings and project_timeline to see what the Tares agents already concluded, so it builds on that work.
  • When it has an answer, it calls record_finding with the entity, a markdown finding and a one-word lowercase verdict such as rca.

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

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

  2. Run the MCP endpoint, which serves http://127.0.0.1:8788/mcp:

    tares mcp
  3. Open the project, go to Settings → Keys and choose New key. Name it after the agent that will hold it, such as claude-code.

  4. Copy the secret straight away. It is shown once.

  5. 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-mcp with TARES_AUTH_TOKEN set to the project key in its environment.

  6. Check the connection from a Claude Code session:

    Use tares: which project can you work in?

    It calls list_projects and names the one project your key belongs to.

  7. 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-server starts 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_project with 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.

Still stuck? Get help

Last updated on