Skip to Content
Tares

How do I ask the Cursor agent to investigate crash loops with Tares?

Tares lets you connect Cursor over MCP and ask what happened to the crash-looping service in the last 15 minutes. Cursor calls the read tool and answers from one correlated timeline of that service’s logs, metrics, alerts and findings. You add one entry to mcp.json, approve the server, and ask in plain language.

How it works

Tares exposes an MCP endpoint with a set of tools. Cursor discovers them once connected. The one that matters for an investigation is read. It returns a time-ordered timeline across all sources that match a label selector, such as {"service": "api-server"}. Narrow it with project or sources if you want.

This is the pull side. You ask, and the agent reads the evidence on demand:

  • Sources that carry the same label, for example service, merge into one timeline on one clock.
  • Cursor does not query each system separately. One read returns the correlated view.
  • Findings recorded earlier on that service appear in the same timeline, so a new investigation starts from the previous conclusion.

The timeline holds what your sources ingest. For a crash-looping service, connect the sources that carry its signals, such as its container logs (docker_logs), its metrics and its alerts, all labeled with the same service name. The AI SRE guide shows that setup end to end.

Set it up

  1. Get your MCP endpoint. On a local Tares the daemon alone does not serve /mcp, so start the MCP server in a second terminal after tares up:

    tares mcp

    It serves http://localhost:8788/mcp. On your own server the endpoint is https://<your-domain>/mcp. On Tares Cloud the console shows it under Connect, and the MCP server is already running.

  2. Add Tares to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project):

    { "mcpServers": { "tares": { "url": "http://localhost:8788/mcp" } } }
  3. Approve the server in Cursor under Settings → MCP. For a server or Tares Cloud instance, replace the URL with yours and add the credential. Use a scoped API key with the read scope rather than the root token. The console’s Connect page generates the exact command with the endpoint and token filled in.

  4. Verify the connection. Ask Cursor:

    Use tares: what are you ingesting right now?

    Cursor should call catalog_list and answer with your sources, triggers and projects.

  5. Ask about the crash loop. Name the service and a short window:

    Use tares: what happened to checkout-api in the last 15 minutes?

    Cursor calls read with the service label and answers from the correlated timeline. In the console, Reads lists each read as it happens, tagged client = mcp.

  6. Follow up on what the timeline shows. Ask when the restarts started, which alert fired first, and what changed just before. Each answer comes from the same evidence, so you can ask for the logs around the first alert or the metrics next to the restarts.

  7. Record the conclusion. Ask Cursor to save what it found with record_finding, which writes a finding on the entity with an optional headline and next_step. A project key lets an agent work inside one project only. Findings show up in the timeline, so the next person or agent who reads that service sees them. The remember tool writes an observation to the agent-memory source.

What you get

  • One question instead of several tabs. Cursor answers from logs, metrics, alerts and findings in one read.
  • A timeline ordered on one clock, so you can see which event came first.
  • Reads you can audit. Each one appears in the console under Reads, tagged client = mcp.
  • A record that persists. A finding recorded on the service is there the next time anyone asks.
  • Access you control. A read scoped key gives Cursor the read surface and nothing that writes.

If you want an agent woken when a trigger fires rather than asked by you, that is the push side. The subscribe tool registers a webhook to be pushed when a trigger fires, and create_trigger makes the trigger. The AI SRE guide walks through the full loop.

When something else fits

  • Use another client if you prefer it. Connecting agents shows setup for Claude Code, Codex, Claude Desktop, VS Code and other MCP clients, and all of them use the same read tool.
  • Use the in-app Ask in the console if you want to explore a service without wiring up an external client.
  • Use a trigger with a subscribed webhook if you want investigations to start without you asking.

Still stuck? Get help

Last updated on