Skip to main content
Back to the Sentry MCP server

MCP Gateway · OpenCode

Sentry icon

Connect Sentry to OpenCode

On call with OpenCode open, you can work a Sentry alert from the shell: confirm which account and organization you are in, narrow down the events inside an issue and hand it to the right team. The OpenCode plugin sends each prompt and tool call to Speakeasy, which allows or denies it before it runs.

Category
Developer tools
Tools
22
Authentication
OAuth
OpenCode
Terminal

Behind the MCP Gateway

Run Sentry MCP behind the MCP Gateway

One URL for every agent, sign-in through your IdP, RBAC down to the tool, and every Sentry call inspected and logged.

Deploy on MCP Gateway

Before you start

What Sentry needs first

Any Sentry user with access to the needed organizations and projects does the Sentry side of the setup.

  • You create nothing in Sentry before adding the server.
  • Users can only reach what their Sentry account already can.
Full Sentry setup guide in the docs

Set up

Add Sentry to OpenCode in 4 steps

  1. 01

    Add Sentry from the catalog

    An admin finds Sentry in the MCP Catalog (MCP Gateway > MCP > Catalog) and clicks Add. Speakeasy registers the vendor's server as a remote MCP server and proxies sessions to it. Nothing is copied or re-hosted.

    Sentry uses OAuth. Servers that support dynamic client registration get their OAuth configuration applied automatically.

    Where MCP-scoped policies are enabled, the install offers a recommended risk policy for the new server that detects secrets and PII and inspects tool requests and responses.

  2. 02

    Choose who can use Sentry

    Give teams the mcp:connect scope on the Sentry server through team access or a role. OpenCode connects to the Sentry server's own URL, and the server's authorization decides who can connect and which tools they can call.

  3. 03

    Connect OpenCode

    Add the server to OpenCode's own mcp config block as a remote server.

    Copy the server's URL from its hosted install page in Speakeasy.

    Add it to the mcp block of your OpenCode config with type set to remote.

    Restart OpenCode and sign in when prompted.

    {
      "mcp": {
        "<server slug>": {
          "type": "remote",
          "url": "<URL from the hosted install page>"
        }
      }
    }
  4. 04

    Sign in and use Sentry from OpenCode

    The first time OpenCode connects, it opens a browser so the person can sign in to Speakeasy through your identity provider.

    Sentry needs its own OAuth grant, so each person connects it once. Until they do, Sentry calls fail while the rest of the gateway keeps working.

    From then on, Sentry's tools appear in OpenCode, limited to what the person's access allows, and every call lands in the gateway's tool logs.

OpenCode doesn't receive MCP servers from plugins. The observability package is installed separately, from a ZIP or with speakeasy-hooks install --provider=opencode, and the device agent can maintain it.

Use cases

What OpenCode users do with Sentry

Confirm which Sentry org you're in

Before acting on an alert, check the authenticated Sentry user and the organizations it can reach, so OpenCode works in the right place.

whoamifind_organizations

Narrow down events in one issue

Filter the events inside a noisy issue with a plain query, such as only those from the latest release or one customer, and read the stack traces that matter.

search_issue_events

Hand an issue to the owning team

When the error belongs to another service, OpenCode finds the team that owns it and reassigns the Sentry issue to them with the context you found.

find_teamsupdate_issue

Tools

22 tools

Each Sentry tool can be allowed or denied per team and role at the MCP Gateway before OpenCode sees it.

whoami

Identify the authenticated user in Sentry.

find_organizations

Find organizations that the user has access to in Sentry.

find_teams

Find teams in an organization in Sentry.

find_projects

Find projects in Sentry.

find_releases

Find releases in Sentry.

get_issue_tag_values

Get tag value distribution for a specific Sentry issue.

See all 22 tools

Control

What Speakeasy can see and stop in OpenCode

The gateway covers every client the same way. The rest depends on what OpenCode exposes to Speakeasy.

Tool logs

Gateway

Every Sentry call is logged with the person and the client that made it.

Access by role

Gateway

People reach only the Sentry tools their team or role allows.

Request and response blocking

Gateway

A risk policy scoped to Sentry can reject a tool request before it reaches the server, or withhold a result from OpenCode. MCP-scoped policies are enabled per organization.

Prompt and tool-call blocking

OpenCode

The OpenCode plugin sends each prompt and tool call to Speakeasy, which allows or denies it before it runs.

Usage telemetry

OpenCode

Token and cost totals flow through the plugin, reported per turn.

Device agent

OpenCode

The device agent installs and maintains the observability package.

  • OpenCode has no OpenTelemetry exporter, so session data comes through the plugin.
  • Tool output is blocked at the gateway rather than in OpenCode's hooks.

Questions

Frequently asked questions

Does Sentry need any setup before OpenCode can use it?
No. You create nothing in Sentry before adding the server. Each person can only reach what their Sentry account already can.
Can Sentry tool output be blocked in OpenCode?
Tool output is blocked at the gateway rather than in OpenCode's hooks. Prompts and tool calls are checked by the OpenCode plugin before they run.
How do OpenCode users get Sentry?
An admin adds Sentry from the Speakeasy MCP Catalog and grants access by team or role. Add the server to OpenCode's own mcp config block as a remote server. Each person then sees only the Sentry tools their access allows.
Are Sentry calls from OpenCode logged?
Yes. Sentry calls go through the MCP Gateway, which logs each tool call and attributes it to the person and the client that made it.

Connect more

Sentry in other clients

AI everywhere.

Control here.