@aparkerio/pagerduty-mcp-server
v0.2.0
Published
Model Context Protocol server for PagerDuty incident management
Maintainers
Readme
PagerDuty MCP Server
A Model Context Protocol (MCP) server that provides tools for interacting with PagerDuty incidents. This server can be run via npx and used with MCP-compatible clients.
Installation
You can run this server directly with npx:
npx @aparkerio/pagerduty-mcp-serverOr install it locally:
npm install -g @aparkerio/pagerduty-mcp-serverConfiguration
The server requires a PagerDuty API key to be set as an environment variable:
export PAGERDUTY_API_KEY="your-pagerduty-api-key"You can obtain an API key from your PagerDuty account under Integrations > API Access Keys.
Available Tools
list_incidents
Lists PagerDuty incidents with optional filtering parameters.
Parameters:
status(array): Filter by incident status (triggered,acknowledged,resolved)urgency(array): Filter by urgency level (high,low)service_ids(array): Filter by service IDsteam_ids(array): Filter by team IDsuser_ids(array): Filter by user IDssince(string): Start of date range (ISO 8601 format)until(string): End of date range (ISO 8601 format)limit(number): Maximum number of incidents to return (1-100, default: 25)offset(number): Pagination offset (default: 0)
Example:
{
"status": ["triggered", "acknowledged"],
"urgency": ["high"],
"limit": 10
}get_incident
Retrieves detailed information about a specific incident.
Parameters:
incident_id(string, required): The ID of the incident to retrieve
Example:
{
"incident_id": "PXXXXXX"
}list_services
Lists PagerDuty services with optional filtering parameters.
Parameters:
query(string): Filter services by nameteam_ids(array): Filter services by team IDslimit(number): Maximum number of services to return (1-100, default: 25)offset(number): Pagination offset (default: 0)include(array): Include additional details (escalation_policies,teams)
Example:
{
"query": "web",
"include": ["teams", "escalation_policies"],
"limit": 10
}get_service
Retrieves detailed information about a specific service.
Parameters:
service_id(string, required): The ID of the service to retrieveinclude(array): Include additional details (escalation_policies,teams)
Example:
{
"service_id": "PXXXXXX",
"include": ["teams"]
}get_incident_notes
Retrieves notes and timeline entries for a specific incident.
Parameters:
incident_id(string, required): The ID of the incident to get notes for
Example:
{
"incident_id": "PXXXXXX"
}list_incident_alerts
Lists alerts for a specific incident.
Parameters:
incident_id(string, required): The ID of the incident to get alerts forlimit(number): Maximum number of alerts to return (1-100, default: 25)offset(number): Pagination offset (default: 0)statuses(array): Filter alerts by status (triggered,resolved)
Example:
{
"incident_id": "PXXXXXX",
"statuses": ["triggered"],
"limit": 50
}Usage with MCP Clients
This server implements the Model Context Protocol and can be used with any MCP-compatible client. The server communicates via stdio and provides the tools listed above.
Development
To run the server locally:
git clone <repository-url>
cd pagerduty-mcp-server
npm install
export PAGERDUTY_API_KEY="your-api-key"
npm run build
npm run startFor development with auto-reload:
npm run devRequirements
- Node.js runtime (>= 18.0.0)
- PagerDuty API key with appropriate permissions
License
MIT
