Skip to Content
Tares

How do I let my own Claude Code session investigate a disk filling up with a project key?

Tares lets your own Claude Code session investigate a disk filling up once you give it a project key and connect it to the Tares MCP endpoint. You create the key under Settings, Keys, then register the endpoint with claude mcp add and an Authorization Bearer header. The key reads that one project and records findings in it, so your session’s conclusions land next to what the Tares agents already found.

How it works

A project key is scoped to one Tares project. When Claude Code connects with it, the project is implied, so the tools need no project argument. Any call outside that project answers 403.

When you ask about a disk, Claude Code uses the project tools in a fixed pattern:

  • list_skills and get_skill load a skill whose description matches the task, so your session follows the same instructions as the Tares agents.
  • stats shows which values moved, and read returns the entity’s timeline across the project’s sources, so you can see when the growth started and what else changed around that time.
  • list_findings and project_timeline show what the Tares agents already concluded, so your session builds on that work.
  • record_finding(entity, finding, verdict) saves the result. The entity is what the finding is about, the finding is markdown, and the verdict is one lowercase word such as rca.

Every finding carries the name you gave the key. If you name the key claude-code, that is the name on each card your session produces.

The session runs when you ask it. It does not start by itself when a trigger fires. For an agent that should be woken on its own, such as a service with a webhook, join_project(url) sends every firing of every trigger in the project to that URL.

Set it up

You need a running Tares instance with a project that has sources and a trigger, for example the AI SRE demo. Start the instance with auth so keys are checked, either with the auth option of tares up or with TARES_AUTH_TOKEN set. An open instance has no keys, so skip the key step there and name the project in your prompts instead. Also run the MCP endpoint with tares mcp, which serves http://127.0.0.1:8788/mcp.

  1. Open the project, go to Settings → Keys and choose New key.
  2. Name the key after the agent that will hold it, such as claude-code.
  3. Copy the secret straight away. It is shown once.
  4. Register the endpoint in Claude Code with the key in an Authorization Bearer header:
claude mcp add --transport http tares http://localhost:8788/mcp \ --header "Authorization: Bearer <project key>"
  1. If you prefer stdio, start tares-mcp with TARES_AUTH_TOKEN set to the project key in its environment instead.
  2. 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.

  1. Ask about the disk:

Use tares: which values moved on api-server in the last 2 hours, and is disk usage part of it? Check the project’s skills first, and record what you conclude.

Claude Code reads the skills, looks at the stats and the timeline, checks earlier findings, and records its conclusion on the entity. Read the full walkthrough in Connect an outside agent to a project. The same steps work for Codex, Cursor or your own MCP client, and only the connect command differs.

What you get

  • A Claude Code session that works inside one project and cannot reach any other.
  • A finding card under What the agents found on the project’s Overview, shown under the key’s name.
  • A thread of its own in Advanced setup’s Activity, marked as recorded from outside Tares.
  • An entry on the entity’s timeline in Explore, so the next Tares agent that reads api-server starts from your session’s conclusion instead of from nothing.
  • A clean way to cut access. Revoke the key under Settings → Keys and the session loses access, and its subscriptions are removed with it. Revoke on the outside agent under Agents stops only the deliveries.

When something else fits

  • If the agent should react without you prompting it, let it join the project with join_project(url) so each trigger firing is delivered to its URL.
  • If you want Tares itself to investigate when a trigger fires, rely on the Tares agents in the project and use your own session only for follow-up questions.

Still stuck? Get help

Last updated on