WP

wpfleger96/pagerduty-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

8 stars 12 forks 质量 79 趋势 36MIT

MCP server exposing PagerDuty incidents, services, schedules, and on-calls to AI agents — read, acknowledge, resolve, with OAuth and API key auth

概览

A server that exposes PagerDuty API functionality to LLMs. This server is designed to be used programmatically, with structured inputs and outputs. The PagerDuty MCP Server provides a set of tools for interacting with the PagerDuty API. These tools are designed to be used by LLMs to perform various operations on PagerDuty resources such as incidents, services, teams, and users. 1. Initialize your local Python environment: 2. Configure authentication (see Authentication below). : X-PagerDuty-Token HTTP header > PAGERDUTY_API_TOKEN environment variable > OAuth 2.0 PKCE When running as part of a platform that injects per-request credentials, the server reads the X-PagerDuty-Token HTTP header. This takes highest priority and does not require any local configuration. Set the PAGERDUTY_API_TOKEN environment variable, or add it to a .env file in the project root. The server will automatically load environment variables from the .env file if present.

README

以下为原文 README 节选,完整内容请查看原文。

PagerDuty MCP Server

A server that exposes PagerDuty API functionality to LLMs. This server is designed to be used programmatically, with structured inputs and outputs.

Overview

The PagerDuty MCP Server provides a set of tools for interacting with the PagerDuty API. These tools are designed to be used by LLMs to perform various operations on PagerDuty resources such as incidents, services, teams, and users.

Getting Started

  1. Initialize your local Python environment:
cd pagerduty-mcp-server
brew install uv
uv sync
  1. Configure authentication (see Authentication below).

Authentication

Priority: X-PagerDuty-Token HTTP header > PAGERDUTY_API_TOKEN environment variable > OAuth 2.0 PKCE

Option 1: X-PagerDuty-Token Header (Platform Integration)

When running as part of a platform that injects per-request credentials, the server reads the X-PagerDuty-Token HTTP header. This takes highest priority and does not require any local configuration.

Set the PAGERDUTY_API_TOKEN environment variable, or add it to a .env file in the project root. The server will automatically load environment variables from the .env file if present.

Environment variable:

export PAGERDUTY_API_TOKEN=your_api_token_here

.env file (recommended):

echo "PAGERDUTY_API_TOKEN=your_api_token_here" > .env

Option 3: OAuth 2.0 PKCE (Local Interactive Use)

OAuth is available for local standalone usage. It opens a browser for authentication and stores tokens securely in the OS keyring. OAuth is opt-in — it only activates when PAGERDUTY_CLIENT_ID is set and no API token is present.

Setup:

  1. Register a PagerDuty OAuth application at Integrations → Developer Tools → My Apps.
  2. Set the required scope to read write.
在 GitHub 查看完整 README

安装

uvx pagerduty-mcp-server
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "pagerduty-mcp-server": { "command": "uvx", "args": ["pagerduty-mcp-server"], "env": { "PAGERDUTY_API_TOKEN": "<PAGERDUTY_API_TOKEN>" } } } }