PagerDuty MCP Server

PagerDuty MCP Server

Enables AI agents to interact with PagerDuty services, incidents, schedules, and on-call management through natural language.

Category
Visit Server

README

PagerDuty MCP Server

A Model Context Protocol (MCP) server for PagerDuty integration that allows AI agents to interact with PagerDuty services, incidents, schedules, and on-call management.

Features

  • List Services: Browse and filter PagerDuty services
  • Incident Management:
    • List incidents with advanced filtering (status, assignee, priority, service, date range)
    • Create new incidents
    • Update incidents (acknowledge, resolve, change priority, escalate)
    • Add responders to incidents
  • On-Call Management: View current on-call schedules and users
  • Schedule Management: List and browse schedules

Prerequisites

  • Node.js v18.0.0 or higher
  • A PagerDuty account with API access
  • PagerDuty API token

Installation

  1. Clone the repository:
git clone <repository-url>
cd pagerduty-mcp
  1. Install dependencies:
npm install
  1. Build the server:
npm run build

Configuration

Environment Variables

Create a .env file in the root directory (use .env.example as a template):

# Required: Your PagerDuty API token
PAGERDUTY_API_TOKEN=your_api_token_here

# Optional: PagerDuty API URL (defaults to https://api.pagerduty.com)
PAGERDUTY_API_URL=https://api.pagerduty.com

Getting Your PagerDuty API Token

  1. Log in to your PagerDuty account
  2. Go to ConfigurationAPI Access
  3. Click Create New API Key
  4. Provide a description and select appropriate permissions
  5. Copy the generated token

Usage

Running the Server

npm start

Using with Claude Desktop

Add the following configuration to your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "pagerduty": {
      "command": "node",
      "args": ["/path/to/pagerduty-mcp/build/index.js"],
      "env": {
        "PAGERDUTY_API_TOKEN": "your_api_token_here",
        "PAGERDUTY_API_URL": "https://api.pagerduty.com"
      }
    }
  }
}

Available Tools

1. list_services

List PagerDuty services with optional filtering.

Parameters:

  • limit (number, optional): Maximum number of services to return (1-100, default: 25)
  • offset (number, optional): Number of services to skip (default: 0)
  • query (string, optional): Filter services by name or description

2. list_incidents

List incidents with comprehensive filtering options.

Parameters:

  • limit (number, optional): Maximum number of incidents (1-100, default: 25)
  • offset (number, optional): Number of incidents to skip (default: 0)
  • statuses (array, optional): Filter by status (triggered, acknowledged, resolved)
  • service_ids (array, optional): Filter by service IDs
  • user_ids (array, optional): Filter by assigned user IDs
  • priority_ids (array, optional): Filter by priority IDs
  • urgencies (array, optional): Filter by urgency (high, low)
  • sort_by (string, optional): Sort by field (incident_number, created_at, updated_at)
  • since (string, optional): Show incidents created after this ISO 8601 date
  • until (string, optional): Show incidents created before this ISO 8601 date

3. create_incident

Create a new PagerDuty incident.

Parameters:

  • title (string, required): Incident title
  • service_id (string, required): ID of the service
  • from (string, required): Email of the user creating the incident
  • priority_id (string, optional): Priority ID
  • urgency (string, optional): Incident urgency (high, low)
  • incident_key (string, optional): Unique key for deduplication
  • details (string, optional): Incident body/details

4. update_incident

Update an existing incident (acknowledge, resolve, change priority, etc.).

Parameters:

  • incident_id (string, required): ID of the incident to update
  • from (string, required): Email of the user making the update
  • status (string, optional): New status (acknowledged, resolved)
  • priority_id (string, optional): New priority ID
  • assignee_ids (array, optional): User IDs to assign
  • escalation_policy_id (string, optional): New escalation policy ID

5. list_oncalls

List current on-call schedules and users.

Parameters:

  • schedule_ids (array, optional): Filter by schedule IDs
  • user_ids (array, optional): Filter by user IDs
  • escalation_policy_ids (array, optional): Filter by escalation policy IDs
  • since (string, optional): Show on-calls since this ISO 8601 date
  • until (string, optional): Show on-calls until this ISO 8601 date

6. list_schedules

List PagerDuty schedules.

Parameters:

  • limit (number, optional): Maximum number of schedules (1-100, default: 25)
  • offset (number, optional): Number of schedules to skip (default: 0)
  • query (string, optional): Filter schedules by name

7. add_responders

Add responders to an existing incident.

Parameters:

  • incident_id (string, required): ID of the incident
  • message (string, required): Message to send to responders
  • from (string, required): Email of the user adding responders
  • requester_id (string, required): ID of the user requesting responders
  • responder_ids (array, optional): User IDs to add as responders
  • escalation_policy_ids (array, optional): Escalation policy IDs to add

Example Usage with Claude

Once configured, you can use natural language with Claude to interact with PagerDuty:

  • "Show me all triggered incidents from the last 24 hours"
  • "List all services that contain 'web' in their name"
  • "Create a high priority incident for the API service with title 'Database Connection Issue'"
  • "Who is currently on-call for the infrastructure team?"
  • "Acknowledge incident #12345 and assign it to user ABC123"
  • "Add responders to incident #67890 with message 'Need immediate assistance with database issue'"

Development

Build

npm run build

Development Mode (with watch)

npm run dev

Clean Build Directory

npm run clean

Error Handling

The server includes comprehensive error handling for:

  • Invalid PagerDuty API tokens
  • Network connectivity issues
  • Invalid parameters
  • PagerDuty API rate limits
  • Missing required fields

All errors are properly formatted and returned as MCP-compliant error responses.

Security

  • API tokens are loaded from environment variables only
  • All API requests include proper authentication headers
  • Input validation is performed on all parameters
  • Sensitive information is never logged

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

For issues and questions:

  1. Check the PagerDuty API documentation
  2. Review the error messages in the console
  3. Ensure your API token has the necessary permissions
  4. Verify your environment configuration

Changelog

v1.0.0

  • Initial release
  • Full PagerDuty API integration
  • MCP compliance
  • Comprehensive incident management
  • Service and schedule browsing
  • On-call management
  • Advanced filtering and search capabilities

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured