<!-- Give Cursor or Claude Code your production errors — Heystack docs. Rendered: https://heystack.dev/docs/coding-agent-production-errors · Index: https://heystack.dev/llms.txt -->
# Give Cursor or Claude Code your production errors

Connect your coding agent to Heystack so it can read the errors, failing requests and visits behind a problem in your live app, and fix it from real evidence, not guesses.

## What your agent can read

Once connected, your agent can look up the same evidence you see in the [console](https://console.heystack.dev):

- **Grouped errors** with how often they happen, how many people they affect, and when they were first and last seen.
- **One problem in depth**: a per-release breakdown that suggests whether a release introduced it, an example request that failed, and the people and visits affected.
- **A request step by step**: each step, the errors recorded on it, its log lines and a link to the visit's replay when one was recorded.
- **Visits, replays, bug reports and iOS crashes**, and **AI usage and cost**.
- **A one-call investigation**: possible causes, each marked supported, ruled out or unknown, with the evidence behind it and suggested next steps.

The full list is in [MCP server](https://heystack.dev/docs/mcp#tool-reference).

## Before you start

Your app needs to be sending data to Heystack. If it isn't yet, follow the [Quickstart](https://heystack.dev/docs/quickstart) or the guide for your builder: [Lovable](https://heystack.dev/docs/monitor-lovable-app), [Bolt](https://heystack.dev/docs/monitor-bolt-app), [v0](https://heystack.dev/docs/monitor-v0-app) or [Replit](https://heystack.dev/docs/monitor-replit-app).

## Connect Claude Code

Run this once:

```bash
claude mcp add --transport http heystack https://mcp.heystack.dev/mcp
```

Then run `/mcp` inside Claude Code to sign in, and pick your workspace. Or install the Heystack plugin, which adds the same connection plus skills for setting up and investigating:

```text
/plugin marketplace add heystack-hq/heystack-plugins
/plugin install heystack@heystack
```

More options are in [MCP server › Claude Code](https://heystack.dev/docs/mcp#claude-code).

## Connect Cursor

Use the one-click **Add to Cursor** link in [MCP server › Cursor](https://heystack.dev/docs/mcp#cursor), or add this to `.cursor/mcp.json` in your project:

```json
{ "mcpServers": { "heystack": { "url": "https://mcp.heystack.dev/mcp" } } }
```

Sign in when Cursor asks, and pick your workspace.

VS Code, Codex, Gemini CLI, ChatGPT, Claude.ai and other agents connect the same way: see [Connect your agent](https://heystack.dev/docs/mcp#connect-your-agent).

## Ask

Start by checking the connection:

```text
Run heystack_verify_setup for my app and tell me what's arriving.
```

Then ask about what's going wrong, in plain words:

```text
What are the top errors in production in the last 24 hours?
Did any of them start with the latest release?
```

```text
Users say signup has been failing since this morning. Investigate with Heystack,
show me the evidence, then propose a fix in the code.
```

The [agent playbooks](https://heystack.dev/docs/agent-playbooks) have more questions that work well.

## Hand an issue to your agent from the console

On an issue or an investigation, **Continue in your coding agent** opens a hand-off: **Open in Claude Code** (when the app has a GitHub repository), **Open in Cursor**, or text to copy for another agent. Only the investigation's id goes into the link, never its contents. See [Continue in your coding agent](https://heystack.dev/docs/console#continue-in-your-coding-agent).

## What stays under your control

- A connection works with **one workspace**, chosen when you sign in.
- It can do only what your role allows. Actions that delete, grant access or create keys ask for confirmation first.
- Everything an agent does is recorded in the console's audit log (**Settings › Organisation › Audit log**, for admins).
- Error messages, log lines and other data from your app are treated as data, never as instructions to the agent.

## What to expect

- A **likely cause** from Heystack is labelled as a suggestion, with how confident it is. Your agent should check it against your code.
- Browser errors carry the stack trace of the code your site actually ran. If that code is minified, the locations point at the minified files; Heystack can't map them back to your source files yet.
- Your agent proposes the change in your code, and you decide what ships. Repairs prepared by Heystack itself are in early access, only for apps that connect a repository and allow them: see [App Care](https://heystack.dev/docs/app-care).

## Related

- [MCP server](https://heystack.dev/docs/mcp): every connection option, tool and limit.
- [Agent playbooks](https://heystack.dev/docs/agent-playbooks): step-by-step investigations.
- [Find out why your AI app is slow or expensive](https://heystack.dev/docs/ai-app-slow-or-expensive)
