Skip to Content
TaresGuidesConnect an outside agent to a project

Connect an outside agent to a project

After this guide, Claude Code works inside one Tares project: it reads the project’s sources, follows the project’s skills, sees what the Tares agents already found, and records its own findings on the same timelines. Everything it records shows on the project’s Overview.

The same steps work for any MCP client (Codex, Cursor, your own agent); only the connect command differs, see Connecting agents.

You need:

  • A running Tares instance with a project that has sources and a trigger, for example the AI SRE demo.
  • The instance started with auth (tares up --auth, or TARES_AUTH_TOKEN set), so keys are checked. On an open instance there are no keys; skip step 1 and name the project in your prompts instead.
  • The MCP endpoint running: tares mcp (it serves http://127.0.0.1:8788/mcp).

Make a project key

Open the project, go to Settings → Keys, and choose New key. Name it after the agent that will hold it, such as claude-code: every finding it records carries this name. Copy the secret now; it is shown once.

The key reads this project only and records findings in it. Any other call answers 403. See Project keys for the full list.

Connect Claude Code with the key

claude mcp add --transport http tares http://localhost:8788/mcp \ --header "Authorization: Bearer <project key>"

Over stdio, start tares-mcp with TARES_AUTH_TOKEN=<project key> in its environment instead. With a project key the project is implied: the tools need no project argument.

Check the connection in a Claude Code session:

Use tares: which project can you work in?

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

Work in the project

Ask for something the project is about:

Use tares: what happened to api-server in the last 30 minutes? Check the project’s skills first, and record what you conclude.

Claude Code works through the project tools:

  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 what the Tares agents already concluded, so it builds on that instead of repeating it.
  4. record_finding(entity, finding, verdict) when it concludes: the entity is what the finding is about (here api-server), the finding is markdown, the verdict one lowercase word such as rca.

See it in the project

Open the project. The finding is a card under What the agents found on the Overview, under the key’s name. In Advanced setup’s Activity it is a thread of its own, marked as recorded from outside Tares. It is also on the entity’s timeline in Explore, so the next Tares agent that reads api-server starts from it.

Optional: be woken by the project’s triggers

Claude Code runs when you ask it. An agent that runs on its own, such as a service with a webhook, can join the project instead: join_project(url) (or POST /api/projects/{id}/subscribe {"url": ...}) sends every firing of every trigger in the project to that URL, triggers added later included. The body carries project, dispatch_id, key (the entity), payload (the timeline) and run_ids, the Tares agent runs the same firing started. The agent shows under Agents on the project’s page, marked external; click it for its last delivery.

To cut the agent off, revoke the key under Settings → Keys. Revoking removes the key’s subscriptions too; Revoke on the outside agent under Agents stops only the deliveries.

Last updated on