# Triage Sentry errors into Linear issues

> Error alerts pile up and nobody knows which ones matter or who owns them.

This setup is for engineering leads and on-call developers who get more Sentry alerts than they can triage. Claude reads unresolved Sentry issues and their stack traces, checks the related code in GitHub, and drafts Linear issues for the right team. You end up with a short list of tickets that explain the error, its impact and the likely file, created only after you approve them.

## Steps

1. **Connect Sentry**: Add Sentry's hosted MCP server to Claude Desktop or Claude Code and sign in to your Sentry organization through OAuth. Ask Claude to list the top unresolved issues in one project from the last 24 hours to confirm access. Claude sees the organizations and projects your Sentry account can see.
   Tip: Start with a single project so the first triage stays small.
2. **Connect Linear**: Add Linear's hosted MCP server and authorise it with your Linear workspace. Ask Claude to list your teams and labels so it uses the right team key, labels and priority values. Tell it which team owns which service, for example in a short mapping you paste at the start.
   Tip: Keep a saved prompt with your service-to-team mapping and reuse it each time.
3. **Add code context**: Connect GitHub's MCP server with read access to the repositories behind your Sentry projects. Claude can then open the file and line from a stack trace and check recent commits that touched it. Use a fine-grained token or OAuth scoped to those repositories only.
   Tip: Read-only repository access is enough for this setup.
4. **Approve the tickets**: Ask Claude to propose one Linear issue per Sentry problem, with the error message, event count, affected users, a link to the Sentry issue and the suspected file. Review the drafts, drop duplicates and noise, then approve each create call. Ask Claude to add the Linear link back as a comment on the Sentry issue if your team tracks it there.
   Tip: Ask Claude to check Linear for an existing ticket with the same error before drafting a new one.

## Prompts to try

- List the 10 unresolved Sentry issues in project web with the most users affected in the last 24 hours.
- For the top 3, read the stack traces, find the likely file in GitHub and draft Linear issues for the Frontend team. Don't create them yet.
- Check Linear for existing tickets that mention TypeError: Cannot read properties of undefined before you draft anything.
- Create the approved drafts with priority High and the label sentry.
- Which recent commit most likely introduced the error in issue WEB-4F2?

## What you need

- Sentry organization access
- Linear workspace with permission to create issues
- GitHub access to the related repositories
- Claude Desktop or Claude Code

## Limits

- Claude's guess at the faulty file comes from stack traces and recent commits and can be wrong.
- Minified or unsymbolicated stack traces give Claude much less to work with; upload source maps to Sentry.
- It does not know team ownership unless you tell it.

## Security notes

- Sentry access is read-only.
- Keep approval on for creating Linear issues.

## MCP servers

- [Sentry MCP Server](https://docs.sentry.io/product/sentry-mcp/): issue-read, event-read
- [Linear MCP Server](https://linear.app/docs/mcp): issue-read, issue-write, project-read
- [GitHub MCP Server](https://github.com/github/github-mcp-server): repository-read, issue-write, pull-request-write

## FAQ

**Can Claude resolve or ignore Sentry issues?**

The Sentry server includes tools that can update issues, so this setup relies on you not approving those calls. If you want strict read-only use, deny those tools in your host's permission settings.

**Do I need paid plans?**

The MCP servers themselves do not need a specific plan, but you need accounts in Sentry, Linear and GitHub with access to the relevant projects. Some Sentry features, like its AI analysis, depend on your Sentry plan.

**Will Claude assign tickets to people?**

It can if you ask and give it the right Linear user or team, but it does not know who owns what by default. A short ownership mapping in your prompt gives better results than letting it guess.

**Which host works best?**

Claude Code is handy because it can also read your local checkout and run tests. Claude Desktop works well if you only want triage and tickets.

## Tools

- **[Sentry](https://suiteintent.com/t/sentry?m=GB)**: Error and performance monitoring for apps. · Best for: Hearing about bugs before customers do · Free plan · 5000
- **[Linear](https://suiteintent.com/t/linear?m=GB)**: Fast, keyboard-first issue tracker. · Best for: Startups planning work in cycles · Free plan · Free for startups
- **[GitHub](https://suiteintent.com/t/github?m=GB)**: Code hosting, issues and pull requests. · Best for: Teams reviewing code through pull requests · Free plan · 10000
