Get the FREE Ultimate OpenClaw Setup Guide →

pagerduty

PagerDuty MCP Server for LLM Agent Integration

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio wpfleger96-pagerduty-mcp-server uvx pagerduty-mcp-server \
  --env PAGERDUTY_API_TOKEN="<PAGERDUTY_API_TOKEN>"

How to use

The PagerDuty MCP Server exposes a structured set of tools that interact with the PagerDuty API, enabling LLMs to manage incidents, services, teams, and users through a consistent API surface. It is designed to be used programmatically, with predictable input/output formats and built-in response schemas to simplify integration with downstream tools and agents. Typical usage involves starting the server locally (or via a container/runtime that supports UV), authenticating with a PagerDuty API token, and issuing requests to query, create, update, or delete PagerDuty resources via the provided endpoints.

You can access the server in several ways:

  • Goose Extensions (Desktop): Configure a StandardIO extension that runs the MCP server using UV as the backend, enabling tool discovery and invocation from Goose. The extension expects a command like uvx pagerduty-mcp-server with the PAGERDUTY_API_TOKEN environment variable.
  • Claude/Cursor style integration: Use the standard MCP JSON configuration that maps a server name to a command and arguments. Include your API token in the env block so that requests to PagerDuty are authenticated.
  • Standalone server: Run the MCP server directly from a Python virtual environment to expose the API surface to your applications or agents. The server will provide a stable response format and error handling for all PagerDuty resources.

Tools exposed include operations for incidents, services, teams, users, and escalation policies, with parameters for filtering, pagination, and error handling. The server adheres to the MCP response conventions, returning metadata, a pluralized resource list, and an optional error object when something goes wrong.

How to install

Prerequisites:

  • Python 3.8+ and a workspace with network access to install dependencies
  • A PagerDuty API token with appropriate permissions
  • Optional: uv (Unofficially named as 'uv' from Ultralytics? In this project, uv refers to the UV toolchain for running MCP servers). The README shows installing uv on macOS via Homebrew.

Install and run locally:

  1. Create and activate a Python virtual environment:
python3 -m venv .venv
source .venv/bin/activate
  1. Install the MCP server package (from PyPI):
pip install pagerduty-mcp-server
  1. If you prefer running directly from source, clone the repository and install requirements:
git clone https://github.com/wpfleger96/pagerduty-mcp-server.git
cd pagerduty-mcp-server
pip install -r requirements.txt  # if a requirements file exists
  1. Install UV (if not already installed) and ensure it's in your PATH:
# macOS example via Homebrew
brew install uv
uv sync
  1. Prepare your PagerDuty API token:
  • Export as an environment variable or place in a .env file in the project root. Example:
export PAGERDUTY_API_TOKEN=your_api_token_here
# or in .env
echo "PAGERDUTY_API_TOKEN=your_api_token_here" > .env
  1. Run the server in standalone mode (example path adjusted to your setup):
uv run path/to/repo/pagerduty-mcp-server/.venv/bin/pagerduty-mcp-server
  1. Verify accessibility by invoking a sample tool or querying the API endpoints as documented in the repository.

Additional notes

Tips and common issues:

  • Ensure the PAGERDUTY_API_TOKEN is set and has the necessary permissions for the actions you intend to perform (read/write access as required).
  • The server adheres to a standardized MCP response format, including metadata, a pluralized resource array, and an error object when applicable.
  • When listing resources, pagination is automatic, and you can control the number of results with limit parameters in your queries. If limit is not specified, a default cap (RESPONSE_LIMIT) is used by the server.
  • For development, you can debug using the included MCP Inspector tooling as shown in the README: npx @modelcontextprotocol/inspector uv run ... to inspect MCP interactions.
  • If running in Goose or Claude/Cursor environments, make sure the environment and paths align with the expected command and arguments (uvx pagerduty-mcp-server) and that the environment variable for the API token is exposed to the runtime.
  • When encountering errors, consult the standard error structure in responses, which includes a message and a code to help diagnose invalid IDs, missing parameters, or API failures.

Related MCP Servers

Sponsor this space

Reach thousands of developers