Skip to main content
Back to the PagerDuty MCP server

MCP Gateway · OpenCode

PagerDuty icon

Connect PagerDuty to OpenCode

Responders who live in a shell can work a PagerDuty incident from OpenCode. Acknowledge it, hand it to someone else, pull in a second responder from the team that owns the failing code, and find out whether this kind of incident is normal for the service. Speakeasy checks every prompt and tool call through the OpenCode plugin first.

Category
Infrastructure
Tools
64
Authentication
API key
OpenCode
Terminal

Behind the MCP Gateway

Run PagerDuty MCP behind the MCP Gateway

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

Deploy on MCP Gateway

Set up

Add PagerDuty to OpenCode in 4 steps

  1. 01

    Add PagerDuty from the catalog

    An admin finds PagerDuty 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.

    PagerDuty authenticates with an API key. Enter it under Upstream headers in the install dialog, or later on the server's Settings tab. The key is stored on the server, sent with every upstream request, and never reaches anyone's client configuration.

    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 PagerDuty

    Give teams the mcp:connect scope on the PagerDuty server through team access or a role. OpenCode connects to the PagerDuty 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 PagerDuty from OpenCode

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

    From then on, PagerDuty'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 PagerDuty

Acknowledge or reassign an incident

Ask OpenCode to change an incident's status, urgency or assignee, or raise its escalation level, while you keep your shell and logs in view.

manage_incidents

Bring in another responder

When the problem crosses into another team's code, OpenCode looks up that team's members and adds the right person to the incident as a responder.

list_team_membersadd_responders

Check if an incident is unusual

OpenCode gets outlier information for the incident on its service, so you know whether you are dealing with a familiar failure or something new.

get_outlier_incident

Tools

64 tools

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

list_alert_grouping_settings

List all alert grouping settings with optional filtering.

get_alert_grouping_setting

Get details for a specific alert grouping setting.

list_alerts_from_incident

List alerts for a specific incident.

get_alert_from_incident

Get a specific alert from an incident.

list_change_events

List all change events with optional filtering.

get_change_event

Get details about a specific change event.

See all 64 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 PagerDuty call is logged with the person and the client that made it.

Access by role

Gateway

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

Request and response blocking

Gateway

A risk policy scoped to PagerDuty 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

Where is PagerDuty tool output blocked for OpenCode?
Tool output is blocked at the gateway rather than in OpenCode's hooks. The OpenCode plugin still checks each prompt and tool call before it runs.
What keeps the Speakeasy plugin installed on responders' laptops?
The device agent installs and maintains the observability package. It can also be installed from a ZIP or with speakeasy-hooks install --provider=opencode.
How do OpenCode users get PagerDuty?
An admin adds PagerDuty 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 PagerDuty tools their access allows.
Are PagerDuty calls from OpenCode logged?
Yes. PagerDuty 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

PagerDuty in other clients

AI everywhere.

Control here.