How do I ask the Cursor agent to investigate error spikes with Tares?
Tares lets the Cursor agent investigate error spikes once you add the Tares MCP server to Cursor and ask what happened to a service in the last 15 minutes. Cursor calls the read tool and answers from one correlated timeline of logs, metrics, alerts and findings. You need one entry in mcp.json and one prompt, and Cursor uses the same read surface as any other MCP client.
How it works
This is the pull side: you ask, the agent reads. Tares ingests your sources and joins them on a shared label such as service, so every signal for a service sits on one clock. The MCP server exposes that timeline as tools. Cursor discovers the tools when it connects.
When you ask about a service, Cursor calls read with a label selector such as {"service": "api-server"}. The call returns a time-ordered timeline across all sources that match the selector. An error spike shows up as the error logs, the metric that climbed and any alert that fired, side by side. If an agent already recorded a finding on that service, the finding is in the same read, so Cursor starts from the earlier conclusion.
The tools Cursor can use to look around:
catalog_listlists your sources, triggers and projects.catalog_describeshows one object’s schema, freshness and sample events.readreturns the correlated timeline, andsourcesnarrows it to just the ones that matter.list_findingsshows what agents already concluded in a project.
A read key gets the read surface. Writing tools need a matching scope.
Set it up
- Start Tares and its MCP endpoint on your machine. Run
tares upin one shell andtares mcpin a second shell. The endpoint ishttp://127.0.0.1:8788/mcp. On your own server the endpoint is your domain with the path/mcp, and on Tares Cloud the console shows it under Connect. A server or Tares Cloud instance already runs the MCP server, so there is nothing to start.
tares up
tares mcp- Add Tares to Cursor. Edit
~/.cursor/mcp.jsonfor all projects, or.cursor/mcp.jsonfor one project.
{
"mcpServers": {
"tares": {
"url": "http://localhost:8788/mcp"
}
}
}-
Approve the server under Settings, MCP, in Cursor.
-
Verify the connection. Ask Cursor:
Use tares: what are you ingesting right now?
Cursor calls catalog_list and answers with your sources, triggers and projects.
- Ask about the spike. Name the service and a window:
Use tares: what happened to api-server in the last 15 minutes?
Replace api-server with the value of your own service label. Cursor calls read and answers from the correlated timeline. Ask follow-ups such as which log lines match the error rate, or whether an alert fired first.
- Check the reads in the console. Reads lists each read as it happens, tagged
client = mcp.
If your instance is secured, the MCP surface requires a credential. Use an API key with the read scope rather than the root token. The console’s Connect page generates the exact client setup with your endpoint and token filled in. The Connecting agents page covers the credential, the stdio transport and every other client.
Want to see a spike without waiting for a real one? The AI SRE guide stands up a demo system with an error_spike scenario. It fires the HighErrorRate alert, so you can ask Cursor the same question while the timeline turns red.
What you get
- An answer to “what happened to this service” from one read, so Cursor does not query each system separately.
- Logs, metrics, alerts and findings merged on one clock, so you can see which came first.
- Earlier conclusions in the answer, so a second investigation builds on the first.
- A visible trail: every read appears under Reads in the console.
- The same setup works for the other tools.
catalog_listandcatalog_describelet Cursor learn what is ingested before it reads.
When something else fits
- If you want an investigation to start without anyone asking, use a trigger that wakes an agent when an alert fires. The AI SRE guide builds that push side next to the pull side described here.
- If you want a chat inside Tares instead of an external client, use Ask in the console, which has the same read tools.
- If you work in Claude Code, the Tares plugin is the default path, and Codex has its own one-line command. Both are on the Connecting agents page.