Why this workflow exists
The fix for a production error is usually small. The expensive part is everything before the fix: open the alert, read the trace, find which line in which file, pull that code, figure out what input breaks it, decide how urgent it is, and write a ticket clear enough that someone can act. That investigation happens at the worst time — mid-incident — and it’s almost entirely mechanical.
This workflow hands the mechanical 20 minutes to Claude. It reads the error where it lives, pulls the real code the trace points at, makes a severity call against thresholds you set, and drafts the issue. You stay the decision-maker on severity and on whether the issue is filed. You stop being the one assembling context under pressure.
The first run takes ~20 minutes for setup. After that, alert to triaged issue is about 5 minutes.
Install in 10 minutes
You need both Sentry MCP and GitHub MCP — the whole value is connecting the error to the code.
1. Install Sentry MCP
claude mcp add --transport sse sentry https://mcp.sentry.dev/sse
Auth is OAuth in the browser on first use. The maintained endpoint is on the Sentry MCP page. Verify with /mcp — sentry should be connected.
2. Install GitHub MCP
claude mcp add github -- npx -y @modelcontextprotocol/server-github
Set GITHUB_PERSONAL_ACCESS_TOKEN with repo read and issue write scope. Scopes are on the GitHub MCP page.
The first run
Don’t wait for a real incident — practice on an existing noisy P3 in Sentry so you’re not learning the workflow while something is on fire. Run prompt 1 and look at frequency and user count first; that’s the part humans skip and then misjudge severity.
Run prompt 2 and confirm Claude opened the actual code, not just paraphrased the error. Make the severity call in prompt 3 against real thresholds. Draft the issue in prompt 4, read it, and approve before it’s filed — issues are created only on your say-so.
What success looks like
An alert fired. Five minutes later there’s a GitHub issue with the exception in the title, the failing file:line in the body, a reproduction derived from the trace, a severity with a stated reason, and a link back to Sentry. The next person opens it and writes a fix — they never had to do the investigation, because it was already done.
Going further
- Dedupe before filing. Add: “before creating, search existing open issues for this exception — if one exists, comment the new occurrence count instead of opening a duplicate.”
- Standing severity rules. Keep your P1/P2/P3 thresholds in the prompt verbatim every time so triage is consistent across whoever is on call.
- Close the loop. When the fix PR merges, pair this with the PR auto-review sweep so the regression fix gets a second pass before it ships.
Related
- Sentry MCP — reads the error and trace
- GitHub MCP — reads the code, files the issue
- Automated PR review queue — review the fix before it ships