PA

PagerDuty MCP Server for Incident Management

Manage incidents, services, schedules, and event orchestrations from your MCP server to control your PagerDuty account and streamline incident response.

Quick Install
npx -y @PagerDuty/pagerduty-mcp-server

Overview

PagerDuty’s MCP (Model Context Protocol) server runs locally and exposes your PagerDuty account through MCP-compatible clients (VS Code, Cursor, Claude Desktop, etc.). It translates client tool actions into PagerDuty API operations so you can list incidents, inspect services and schedules, and perform orchestration tasks directly from within your editor or chat assistant.

This server is particularly useful for developers, SREs, and incident responders who want fast, programmatic access to PagerDuty objects without switching contexts. It supports read operations out of the box and can enable write operations (create/acknowledge incidents, create overrides, etc.) using a runtime flag and a PagerDuty User API Token.

Features

  • Read and write access to PagerDuty resources (incidents, services, schedules, on-call entries, event orchestrations)
  • Integrates with MCP-enabled clients via stdio (recommended for editors/desktop assistants)
  • Optional write-tools mode that must be explicitly enabled to perform modifying operations
  • Configurable PagerDuty API host (supports global and EU hosts)
  • Environment-driven configuration for secure API token injection
  • Lightweight local runtime; intended to be launched and managed by your MCP client

Prerequisites

  • A PagerDuty User API Token (create one from User Settings → API Access)
    • Keep this token secure and follow the PagerDuty Developer Agreement
  • A compatible MCP client (VS Code Chat, Cursor, Claude Desktop, or any MCP-capable client)
  • A runtime used to launch the MCP server (the repository uses uv/uvx tooling in examples)

Installation / Configuration

  1. Clone the repository (or install the packaged binary if available):
git clone https://github.com/PagerDuty/pagerduty-mcp-server.git
cd pagerduty-mcp-server
# build or install per repo instructions (if provided)
  1. Start the server directly (example using uvx as the launcher):
uvx pagerduty-mcp --enable-write-tools
  • Omit --enable-write-tools to run in read-only mode.
  • Set the PagerDuty token via environment variable (see table below).
  1. Common environment variables:
export PAGERDUTY_USER_API_KEY="pd_user_api_token_here"
export PAGERDUTY_API_HOST="https://api.pagerduty.com"   # or https://api.eu.pagerduty.com for EU accounts

Environment variables reference:

VariablePurposeExample
PAGERDUTY_USER_API_KEYPagerDuty User API token used to authenticate requestspdXXXX…
PAGERDUTY_API_HOSTPagerDuty API base URL (global or EU)https://api.pagerduty.com
  1. Passing env & flags from an MCP client:
  • If your client supports prompting for secrets, map the user input into PAGERDUTY_USER_API_KEY so tokens are not stored in plain text.

Example: VS Code settings.json snippet

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "pagerduty-api-key",
        "description": "PagerDuty API Key",
        "password": true
      }
    ],
    "servers": {
      "pagerduty-mcp": {
        "type": "stdio",
        "command": "uvx",
        "args": ["pagerduty-mcp", "--enable-write-tools"],
        "env": {
          "PAGERDUTY_USER_API_KEY": "${input:pagerduty-api-key}",
          "PAGERDUTY_API_HOST": "https://api.pagerduty.com"
        }
      }
    }
  }
}

Example: Cursor settings.json snippet

{
  "mcpServers": {
    "pagerduty-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": ["pagerduty-mcp", "--enable-write-tools"],
      "env": {
        "PAGERDUTY_USER_API_KEY": "${input:pagerduty-api-key}"
      }
    }
  }
}

Example: Claude Desktop configuration snippet

{
  "mcpServers": {
    "pagerduty-mcp": {
      "command": "uvx",
      "args": ["pagerduty-mcp", "--enable-write-tools"],
      "env": {
        "PAGERDUTY_USER_API_KEY": "your-pagerduty-api-key-here",
        "PAGERDUTY_API_HOST": "https://api.pagerduty.com"
      }
    }
  }
}

Available Resources

  • GitHub repository: https://github.com/PagerDuty/pagerduty-mcp-server
  • PagerDuty API host options:
    • Global: https://api.pagerduty.com
    • EU: https://api.eu.pagerduty.com
  • Typical resource types exposed by the MCP server:
    • Incidents (list, details, create/acknowledge/resolve when write tools enabled)
    • Services
    • Schedules and on-call entries
    • Schedule overrides
    • Event orchestrations and orchestration runs

Use Cases

  • Query on-call engineers from within VS Code: “Who is currently on call for the database service?”
  • Triage and acknowledge an incident from a chat assistant without switching to the web console: “Acknowledge the latest PagerDuty incident for service X.”
  • List or create schedule overrides during planned maintenance windows: “Add an override for user [email protected] on the DB schedule for 2026-04-10.”
  • Inspect event orchestrations to see recent automation runs: “Show my last 5 event orchestrations.”
  • Build editor workflows or command palettes that surface PagerDuty objects (e.g., quick open an incident or create a follow-up task).

Security and Best Practices

  • Treat PAGERDUTY_USER_API_KEY like a secret; prefer client-managed prompt inputs rather than hard-coding in files.
  • Only enable write tools (--enable-write-tools) when you trust the client environment and workflows.
  • If your org uses the EU region, set PAGERDUTY_API_HOST to the EU API host to avoid cross-region issues.

For detailed usage and the latest instructions, see the repository on GitHub: https://github.com/PagerDuty/pagerduty-mcp-server.