communitystdio

PagerDuty MCP Server

List and acknowledge incidents, read on-call schedules, and check services from Claude Code or Cursor with a PagerDuty API key.

Updated: April 15, 2026

Install

npx mcp-server-pagerduty
~/.claude/settings.json
{
  "mcpServers": {
    "pagerduty-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-pagerduty"
      ],
      "env": {
        "PAGERDUTY_API_KEY": "your_api_key"
      }
    }
  }
}

Capabilities

  • + List and acknowledge incidents with severity and service filters
  • + Read on-call schedules for any team or rotation
  • + View service health and list services with recent incident counts
  • + Check escalation policies and who gets paged when
  • + Add incident notes and log activity for post-incident review
  • + Search past incidents by timeframe, service, or keyword

Limitations

  • - Requires a REST API key (not an integration key); the two look similar but serve different purposes
  • - Cannot trigger new incidents via MCP; use the Events API v2 endpoint instead
  • - Schedule management is read-only; adjustments happen in the web UI
  • - No runbook automation integration; runbook tools have a separate product surface

PagerDuty MCP server setup for Claude Code and Cursor

Quick answer: The PagerDuty MCP server wraps the PagerDuty API as MCP tools for Claude Code and Cursor. Drop in the env vars, run one npx command, and the editor can reach the service directly. Setup takes about 3 minutes, tested on mcp-server-pagerduty@0.4.0 on April 15, 2026.

PagerDuty is the incident response platform behind most mature SRE and on-call workflows. Incidents, schedules, services, and escalations all live under a single REST API. Without an MCP connection, working with PagerDuty means flipping between the editor and the web UI - copying IDs, pasting results, losing context. The MCP server removes that loop. Claude can fetch the data itself, reason about it, and write changes back without you switching tabs.

This guide covers install, config for both editors, prompt patterns that actually work, and the places where the API will bite back.

What this server does

The server speaks MCP over stdio and wraps the standard PagerDuty SDK. The tool surface is grouped into these sets:

  • Incidents: list_incidents, get_incident, acknowledge_incident, resolve_incident, add_note
  • Schedules: list_schedules, get_schedule, list_users_on_call
  • Services: list_services, get_service, get_service_health
  • Policies: list_escalation_policies, get_escalation_policy

Authentication uses PAGERDUTY_API_KEY. The server holds credentials in process memory for the life of the subprocess. Nothing is written to disk by the server itself. If you rotate the credential, restart the MCP server and the new value takes effect immediately.

The server does not implement a local cache. Every tool call is a fresh round trip. For most workflows this is fine - round trip times are 100-400 ms - but it adds up on heavy batch jobs. For those, prefer the native SDK in a script.

Installing the server

The package ships on npm as mcp-server-pagerduty. The npx -y prefix fetches on first launch and caches the binary for subsequent runs. Cold pull is typically 3-8 MB depending on the SDK footprint and lands in 2-4 seconds.

Before touching editor config, get your credentials ready:

  1. Sign in at pagerduty.com as a user with admin role
  2. Navigate to Integrations > API Access Keys
  3. Click Create New API Key, name it claude-mcp-dev, and mark it General (not read-only if you want ack support)
  4. Copy the key; it is only shown once and cannot be retrieved later

Keep the credential values out of any file you commit. The rest of this guide assumes they live in your shell profile or a .envrc managed by direnv.

Configuring for Claude Code

Claude Code reads MCP servers from ~/.claude/mcp.json or a per-project .mcp.json. Add a pagerduty entry:

{
  "mcpServers": {
    "pagerduty": {
      "command": "npx",
      "args": ["-y", "mcp-server-pagerduty"],
      "env": {
        "PAGERDUTY_API_KEY": "your_api_key"
      }
    }
  }
}

Restart Claude Code, then run /mcp in a session to confirm PagerDuty is attached. Call a read-only tool as a smoke test before any write operations. If the first call returns real data, the auth is working and you can widen the prompt scope.

For team projects, commit a placeholder version of .mcp.json with ${VAR_NAME} inside the env values and let each developer provide the real credential via their shell. Claude Code expands env vars when it spawns the subprocess.

Configuring for Cursor

Cursor uses the same MCP spec and reads from ~/.cursor/mcp.json. The config is identical to Claude Code:

{
  "mcpServers": {
    "pagerduty": {
      "command": "npx",
      "args": ["-y", "mcp-server-pagerduty"],
      "env": {
        "PAGERDUTY_API_KEY": "your_api_key"
      }
    }
  }
}

Open Cursor settings, navigate to the MCP tab, and toggle the server on. Cursor spawns the subprocess lazily on the first tool call. Expect 2-4 seconds of cold start and 150-500 ms per subsequent call depending on network latency to the upstream API.

If the Cursor UI shows the server as red, click the refresh icon and watch the error log. Most failures at this stage are a missing env var or a wrong file path in the credential config.

Example prompts and workflows

A few prompts that work reliably once the server is attached:

  • "List every triggered incident right now and group by service."
  • "Who is on-call for the Payments team this week?"
  • "Acknowledge incident ID ABC123 and add a note saying Investigating, estimated 10 minutes."
  • "Show incidents for service api-checkout from the last 7 days and count by resolution type."
  • "Pull the escalation policy for service billing and show who gets paged at each level."

The model will chain calls. An incident review usually runs list_incidents with a date filter, then get_incident for the longest-running ones, then add_note with the post-mortem summary. Pass the service ID rather than the name - service names are not always unique and the API returns the first match.

One pattern that saves calls: narrow the scope up front. Instead of asking Claude to list every record and then filter, include the filter in the first prompt. The tool returns less data, the response is faster, and the model has less noise to reason through.

Troubleshooting

Tool call returns 401. API key is wrong or the user was deactivated. Regenerate under Integrations > API Access Keys and restart the server.

Tool call returns 403 on ack. Read-only key. Create a General key (not Read-only) if you want to acknowledge incidents or add notes.

Schedule shows wrong time zone. PagerDuty stores everything in UTC. The tool returns ISO timestamps; convert to your local zone in the prompt or let Claude do the conversion explicitly.

Trigger API fails. This server does not trigger incidents. Use the Events API v2 with an integration key instead - it is a separate endpoint (events.pagerduty.com/v2/enqueue) and a different auth model.

Rate limit errors. PagerDuty caps REST at 960 requests per minute per account. The server does not throttle; for large audits, paginate in batches and add a short delay between calls.

Server fails with ENOENT. npx is not on PATH in the env the editor inherits. On macOS, launch Claude Code or Cursor from a terminal so it inherits your shell env, or put the absolute path to npx in the command field.

Subprocess keeps restarting. The MCP transport is strict about newlines on stdio. If the server logs to stdout, those lines get treated as MCP messages and crash the client. Make sure any logging goes to stderr only (most well-built servers already do this).

Alternatives

A few options if the PagerDuty server does not fit your setup:

  • opsgenie-mcp targets Atlassian Opsgenie with a similar incident and schedule surface.
  • rootly-mcp covers Rootly for teams running incidents through that platform.
  • firehydrant-mcp works with FireHydrant for teams with structured incident runbooks.

The MCP server pays off during the noisy parts of on-call: Claude can ack a batch of alerts, pull current on-call info, and draft post-incident notes while you focus on the actual fix.

Performance notes and hardening

Steady-state call latency lands in the 150-500 ms range for most tools. For latency-sensitive workflows, place the editor close to the upstream API region - a Claude Code session in us-east-1 calling an EU-only endpoint will see 120+ ms of extra RTT on every tool call.

For production credentials, prefer scoped tokens over root credentials. Most services expose fine-grained permission models; use them. A token that can only read is strictly safer than one that can write, and costs nothing to rotate.

Log review is easier if you redirect MCP subprocess stderr to a file. Most editors do this by default, but not all surface the log path. On macOS, check ~/Library/Logs/Claude/ or the Cursor equivalent.

The PagerDuty MCP server is the right default for any workflow that already touches PagerDuty regularly. A few minutes of setup replaces hours of copy-paste between the editor and the service's web UI. Start with a read-only credential scoped to a single resource, then widen scopes after you trust the prompt patterns your team develops.

Guides

Frequently asked questions

What is the difference between an API key and an integration key?

The REST API key authenticates your user session and lets you query incidents, schedules, and users. The integration key is a webhook token tied to one service and only used to trigger new incidents. The MCP server uses the REST key - not the integration key.

Can I resolve incidents via this server?

Yes, with a General API key. Call the `resolve_incident` tool with the incident ID. It maps to the REST API `PUT /incidents/{id}` endpoint under the hood.

How does it handle multiple escalation policies?

Each service points at one escalation policy. `list_escalation_policies` returns all policies in the account; `get_escalation_policy` drills into levels and targets. Claude can walk the policy tree and explain who gets paged at each level.

Does it support PagerDuty teams and roles?

Yes for read. You can filter incidents and schedules by team. Writing changes to team membership or role assignments is not exposed; use the web UI for those.

What is the retention on incidents?

PagerDuty keeps incidents for 6 months on most plans and 25 months on higher tiers. The search tool respects whatever retention your plan allows. For longer retention, export via the `/incidents` endpoint to your own DB.

Can the server listen for new incidents?

Not directly. PagerDuty pushes new incidents via webhooks. Point a webhook at your own HTTP endpoint, write incidents to a DB, and have Claude read from that DB. The MCP server handles pull-based queries only.