Connect Sentry to Claude Code

Find errors, inspect traces, and triage production issues. Add Toolspoke to Claude Code once and it can use 14 Sentry actions. Your Sentry credential stays in Toolspoke, and you choose which actions Claude Code may call.

Set it up in Claude Code

Three steps, the first one once for every toolkit you will ever add.

  1. Add Toolspoke to Claude Code

    Run it in your project, then /mcp to sign in

    claude mcp add --transport http toolspoke https://toolspoke.com/mcp

    The sign-in opens in your browser, and Toolspoke asks you to approve it.

  2. Install Sentry and connect it

    Add Sentry to a project in your Toolspoke workspace.

    Auth token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.

    Auth token
    Sentry → User settings → Personal tokens. Needs event:write, project:read, and org:read.
    Organization slug
    The slug in your Sentry URL, e.g. sentry.io/organizations/acme. Every endpoint is scoped to it.
  3. Choose what Claude Code may do

    All 14 actions start on. Switch off any of the 5 actions that change something in Sentry, and Claude Code gets a refusal if it tries.

What you can ask Claude Code for

A few of the Sentry actions that only read, so they are safe to try first.

  • Search the organization's issues, newest and most frequent first
  • Retrieve one issue by its numeric id or short id (e.g. ACME-3F)
  • Retrieve a distributed trace by its 32-character trace id and return the span tree with any attached errors
  • List the organization's projects with their slugs and platforms

What Claude Code can do in Sentry

9 actions read and 5 write.

Reads

  • List issues

    Search the organization's issues, newest and most frequent first. `query` takes Sentry's own search syntax (for example `is:unresolved level:error`, `release:1.4.2`, `user.email:[email protected]`); when omitted Sentry defaults to `is:unresolved`. Start here when triaging production errors, then pass an id to get_issue or get_issue_event.

  • Get issue

    Retrieve one issue by its numeric id or short id (e.g. ACME-3F). Returns status, assignee, counts, first and last seen, affected releases, and tag breakdowns. Long activity feeds are stripped; use get_issue_event for the stack trace.

  • Get issue event

    Fetch a single event for an issue, including its exception stack trace, HTTP request, tags, and runtime context. Defaults to the latest event. This is the action to call when you need to see why an error happened. Breadcrumbs are omitted unless you ask for them because they are large.

  • List issue events

    List recent events for one issue so you can see how often it fires, across which releases, users, and environments. Returns event metadata only, call get_issue_event for a full payload.

  • List issue tag values

    Break one issue down by a tag, release, environment, browser, url, server_name, user, showing the most common values and how many events each accounts for. Use it to work out which release or environment introduced a regression.

  • Get trace

    Retrieve a distributed trace by its 32-character trace id and return the span tree with any attached errors. Use it after finding a trace id on an event to see which service or query made a request slow. The tree is depth-limited to keep the response readable.

  • List projects

    List the organization's projects with their slugs and platforms. Call this to find the project slugs that list_issues and list_releases filter on.

  • List releases

    List releases newest first, with when they were deployed and how many new issues each introduced. Use it to line an error up against a deploy, and to find the version string that resolve_issue's next-release behaviour refers to.

  • List members

    List organization members with their emails, roles, and teams. Use it to pick a valid assignee for assign_issue.

Writes

  • Resolve issue

    Mark an issue as resolved immediately. Use resolve_issue_in_next_release instead when you want Sentry to reopen it if the error survives the next deploy. Reversible with reopen_issue.

  • Resolve issue in next release

    Resolve an issue in the next release: Sentry marks it resolved now and automatically reopens it if the error still occurs after the next deploy. Use resolve_issue to resolve it outright. Reversible with reopen_issue.

  • Ignore issue

    Ignore (mute) an issue so it stops alerting. Optionally re-open it automatically after a number of minutes or once it recurs a given number of times. Reversible with reopen_issue.

  • Reopen issue

    Move an issue back to unresolved, undoing a resolve_issue or ignore_issue.

  • Assign issue

    Assign an issue to a person or a team. Pass a username, email, or user id for a person, or "team:<team_id>" for a team. Call list_members first if you need a valid identifier.

Sentry in Claude Code: questions

Does Claude Code see my Sentry credential?

No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.

Can I stop Claude Code from changing things in Sentry?

Yes. Each of the 14 actions can be switched off for a project. Turn off the 5 that change something and Claude Code can only read.

Will 14 actions crowd Claude Code's context?

No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Sentry action it needs when it needs it. Adding more toolkits does not add more tools to its list.

Can I add it once for every project?

Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.

What does it cost?

Tool calls are free on every plan, and a Sentry call does not run in a sandbox, so it bills nothing.

Try Sentry in Claude Code

Free to start, and tool calls cost nothing on any plan.