Sentry
Connect Claude, ChatGPT or Cursor to Sentry via MCP. Search issues, inspect events, resolve or assign errors, and add comments securely.
Overview
Connect Sentry so AI clients can browse organizations and projects, search issues, inspect events, resolve or assign issues, and add comments — without pasting auth tokens into prompts.
Prerequisites
- A Sentry account with access to one or more organizations
- A stackgate.ai account
Getting credentials
- Sign in to Sentry.
- Create an auth token:
- Personal Auth Token: User settings → Personal Tokens, or
- Organization Auth Token / Internal Integration: Organization Settings → Auth Tokens (or Developer Settings → Internal Integrations)
- Grant at least these scopes:
org:readproject:readevent:readevent:write(required for resolve/assign/comment tools)
- Note your organization slug(s) from the Sentry URL (for example
sentry.io/organizations/acme/→acme). You can connect multiple organizations with the same token when the token can access them. - In stackgate.ai, open My Integrations → Sentry.
- Click Activate, paste the auth token, and enter one or more organization slugs (one per line or comma-separated). The first slug is the default for tools; agents can override with any listed slug.
- Optional: set a custom API base URL for self-hosted Sentry (must include
/api/0).
See the Sentry API authentication docs for token types and scopes.
Using with AI clients
- Dedicated endpoint:
POST /mcp/sentrywith a Sanctum bearer token - Private gateway: one config for all integrations — use
sentry__*namespaced tools
Key tools:
- list_organizations, list_projects — discover orgs and projects
- list_issues, get_issue — search and inspect issues (Sentry search syntax)
- list_issue_events — event history; use
full=truefor stack traces - update_issue — resolve, ignore, assign, or set priority
- add_issue_comment — add a note on an issue
After connecting, use Edit tool access to restrict tools (for example Read-only without update/comment).
See Documentation for HTTP authentication and private gateway setup.
Troubleshooting
- 422 integration not configured — complete the credential form with an auth token and at least one organization slug.
- 401 Unauthorized — regenerate the token in Sentry and update My Integrations.
- 403 Forbidden — add missing scopes (
event:writefor mutations,org:read/project:readfor listing). - Organization slug not in connected list — add the slug to Organization slugs in My Integrations, or use one of the listed slugs.
- 429 Too many requests — Sentry rate-limits per caller and endpoint; wait and use cursor pagination instead of polling.
- Self-hosted — set API base URL to your instance’s
/api/0root (for examplehttps://sentry.example.com/api/0).
Available tools
-
list_organizations
List Sentry organizations accessible to the connected auth token. Organization-scoped tokens typically return a single organization.
-
list_projects
List projects in a Sentry organization.
-
list_issues
List issues for a Sentry organization. Supports Sentry search query syntax. Defaults to unresolved issues when query is omitted.
-
get_issue
Get details for a single Sentry issue, including status, assignee, counts, and latest activity summary.
-
list_issue_events
List events for a Sentry issue. Set full=true to include stack traces and the full event body.
-
update_issue
Update a Sentry issue. Only provided fields are changed (status, assignee, priority, bookmark/seen/subscribe flags).
-
add_issue_comment
Add a comment (note) to a Sentry issue.
MCP endpoint:
https://stackgate.ai/mcp/sentry
(HTTP) or via the
private gateway.