Debug a production error end-to-end without leaving Claude
When to use: Sentry alert fires; you need root cause now.
Prerequisites
- Sentry auth token — User Settings → Auth Tokens → create with 'project:read', 'event:read', 'org:read'
- Token in env — Set SENTRY_AUTH_TOKEN and SENTRY_HOST (sentry.io or self-hosted)
Flow
-
Find the issueUse sentry-mcp. Find the most-firing issue in project 'web' from the last 6 hours.✓ Copied→ Issue ID + count + first/last seen
-
Pull full contextGet the latest event for that issue — stack trace, breadcrumbs, request data.✓ Copied→ Full event payload with frames + trail of user actions
-
Correlate to deployWhat release was running when this first appeared? List the commits in that release.✓ Copied→ Release tag + commit list
-
Propose fixLooking at the stack and the commits — which commit likely caused this? Draft a fix in the relevant file.✓ Copied→ Specific file + line referenced; concrete patch
Outcome: From alert to candidate fix in minutes, with full chain of evidence.
Pitfalls
- Source maps missing — stack frames unhelpful — Verify source map upload in your Sentry releases; otherwise minified frames give Claude nothing