Get the FREE Ultimate OpenClaw Setup Guide →

pagerduty

PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio pagerduty-pagerduty-mcp-server uvx pagerduty-mcp --enable-write-tools \
  --env PAGERDUTY_API_HOST="https://api.pagerduty.com" \
  --env PAGERDUTY_USER_API_KEY="<your-pagerduty-user-api-token>"

How to use

PagerDuty's MCP server exposes a set of write-enabled tools for interacting with your PagerDuty account directly from MCP-enabled clients. Through the MCP server you can list and create incidents, manage services, adjust schedules, and orchestrate events, all via standard MCP transports like stdio. This server is designed to be driven by clients such as Cursor, VS Code, Claude Desktop, or other MCP-compatible frontends, enabling you to issue natural language or structured commands that translate into PagerDuty API calls. When writing tools are enabled, you gain the ability to create incidents, apply schedule overrides, and perform other write operations against PagerDuty, making it practical for automation and proactive incident response workflows.

To use the server from a client, configure the MCP source as an stdio-based server using uvx (the MCP bridge) with the PagerDuty API key supplied via environment variables. Typical configurations pass the API token through an environment variable like PAGERDUTY_USER_API_KEY and optionally set the API host for EU regions. Once configured, you can issue queries such as listing incidents, showing the latest events, or creating new incidents, depending on the client tooling and UI you are using.

How to install

Prerequisites

  • asdf-vm installed (for language/tooling management)
  • uv (the MCP transport) installed globally
  • A PagerDuty User API Token
  • Optional: Docker if you plan to run via container

Local install (using uvx)

  1. Ensure prerequisites are met and you have your PagerDuty User API Token ready.
  2. Clone the MCP server repository for PagerDuty:
    git clone https://github.com/PagerDuty/pagerduty-mcp-server.git
    cd pagerduty-mcp-server
    
  3. Install and prepare dependencies as needed by the repository (per project docs). If the server is exposed as a Python-based MCP service, uvx will load the executable directory (e.g., pagerduty-mcp).
  4. Run the server in read-only mode by default, or with write tools enabled:
    uvx pagerduty-mcp
    # or with write tools
    uvx pagerduty-mcp --enable-write-tools
    
  5. Provide the required environment variables, notably:

Running with Docker

  1. Build the Docker image (from the repository root):
    docker build -t pagerduty-mcp:latest .
    
  2. Run the container (read-only):
    docker run -i --rm \
      -e PAGERDUTY_USER_API_KEY="your-api-key-here" \
      pagerduty-mcp:latest
    
  3. Run with write tools enabled:
    docker run -i --rm \
      -e PAGERDUTY_USER_API_KEY="your-api-key-here" \
      pagerduty-mcp:latest --enable-write-tools
    
  4. For EU deployments, pass the EU API host:
    docker run -i --rm \
      -e PAGERDUTY_USER_API_KEY="your-api-key-here" \
      -e PAGERDUTY_API_HOST="https://api.eu.pagerduty.com" \
      pagerduty-mcp:latest
    

Optional: Running Claude/Desktop integrations

  • If you intend to use Claude Desktop or VS Code integrations, configure the MCP server in their respective config files as shown in the README, ensuring the environment variables are provided in the same way as above.

Additional notes

Notes and tips:

  • Security: Do not expose your PagerDuty API token in plaintext in shared configurations. Use environment variables and secure config handling where possible.
  • EU deployments: If your PagerDuty account is in the EU region, set PAGERDUTY_API_HOST to https://api.eu.pagerduty.com.
  • Write tools flag: Enable --enable-write-tools only when you trust the client and understand the implications of creating incidents, overrides, and other write operations.
  • Transport: This MCP server uses stdio transport, so ensure clients support stdio-based MCP communication.
  • VS Code / Claude: When integrating with IDEs or clients, you may need to add the API host and token as shown in the examples to ensure proper routing to PagerDuty.
  • Debugging: If commands do not appear to respond, verify that the MCP server process is running and that the client is connected to the correct stdio channel. Check logs for API authentication errors or network issues.

Related MCP Servers

Sponsor this space

Reach thousands of developers