PagerDuty MCP Server
Provides tools for managing PagerDuty incidents, including listing, acknowledging, resolving incidents, adding notes, viewing alerts and timelines, and checking on-call schedules.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PagerDuty MCP Server Who is on-call right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PagerDuty MCP Server
Model Context Protocol server for PagerDuty incident management
Integrate PagerDuty with AI assistants (Claude Desktop, Claude Code) for intelligent incident management and on-call support.
šÆ Features
Incident Management (9 Tools)
list_incidents- List incidents with filters (status, urgency, team)get_incident- Get detailed incident informationget_my_incidents- Get incidents assigned to youacknowledge_incident- Mark incident as acknowledgedresolve_incident- Resolve incident with notesadd_incident_note- Add investigation notesget_incident_alerts- Get all alerts for an incidentget_incident_timeline- View incident activity historyget_oncall- Check current on-call schedules
Read-Only by Default
List, query, and analyze incidents
View alerts and timelines
Check on-call schedules
Write Operations (Controlled)
Acknowledge/resolve incidents (requires confirmation)
Add investigation notes
Secure: Uses From-email header for audit trail
Related MCP server: PagerDuty MCP Server
š Quick Start
Prerequisites
Python 3.10+
PagerDuty account with API access
Claude Desktop or Claude Code
1. Get PagerDuty API Token
Login to PagerDuty: https://your-company.pagerduty.com
User Icon ā My Profile
User Settings ā API Access
Click "Create API User Token"
Description:
MCP-IntegrationCopy token (starts with
u+ory1_)
2. Install Dependencies
cd pagerduty-mcp-server
# Using uv (recommended)
uv sync
# Or using pip
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -e .3. Set Environment Variable
# Linux/macOS
export PAGERDUTY_API_TOKEN="u+your-token-here"
# Or add to ~/.bashrc
echo 'export PAGERDUTY_API_TOKEN="u+your-token-here"' >> ~/.bashrc
source ~/.bashrc4. Test the Server
# Run server (stdio mode)
uv run python main.py
# Or with pip
python main.pyāļø MCP Configuration
Claude Desktop
Config file: ~/.config/mcp/mcpServers.json (Linux) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
{
"mcpServers": {
"pagerduty": {
"command": "uv",
"args": [
"--directory",
"/path/to/pagerduty-mcp-server",
"run",
"python",
"main.py"
],
"env": {
"PAGERDUTY_API_TOKEN": "${PAGERDUTY_API_TOKEN}"
}
}
}
}Claude Code (VS Code)
Config file: ~/.config/Code/User/mcp.json
{
"mcpServers": {
"pagerduty": {
"command": "uv",
"args": [
"--directory",
"/path/to/pagerduty-mcp-server",
"run",
"python",
"main.py"
],
"env": {
"PAGERDUTY_API_TOKEN": "${PAGERDUTY_API_TOKEN}"
}
}
}
}Restart Claude Desktop/Code after config changes.
š Tool Usage Examples
List Active Incidents
"List all triggered PagerDuty incidents"Claude will use: list_incidents(status="triggered")
Check Your Incidents
"Show me my assigned PagerDuty incidents"Claude will use: get_my_incidents()
Investigate Incident
"Get details for PagerDuty incident Q26N8MQQHA6R0P"Claude will use: get_incident(incident_id="Q26N8MQQHA6R0P")
View Alerts
"Show all alerts for this incident"Claude will use: get_incident_alerts(incident_id="...")
Acknowledge Incident
"Acknowledge incident Q26N8MQQHA6R0P with note: Investigating database slowdown"Claude will use: acknowledge_incident(incident_id="...", note="Investigating database slowdown")
Check On-Call
"Who is on-call right now?"Claude will use: get_oncall()
š§ Advanced Configuration
Environment Variables
Variable | Required | Description |
| Yes | API User Token from PagerDuty |
| No | Set to |
Custom Filters
# List high-urgency triggered incidents
list_incidents(status="triggered", urgency="high", limit=50)
# List incidents for specific team
list_incidents(team_ids=["P5KZERF"], status="acknowledged")š ļø Development
Project Structure
pagerduty-mcp-server/
āāā main.py # Entry point
āāā src/
ā āāā server_mcp.py # MCP server with 9 tools
ā āāā helpers/
ā āāā pagerduty_client.py # Async API client
ā āāā utils.py # Formatting utilities
ā āāā constants.py # API constants
āāā pyproject.toml
āāā uv.lock
āāā README.mdAdding New Tools
Implement in
src/server_mcp.pyAdd helper functions to
src/helpers/if neededTest with Claude
š API Reference
Incident Statuses
triggered- New incident, not acknowledgedacknowledged- Someone is working on itresolved- Incident fixed
Urgencies
high- High urgency (pages on-call)low- Low urgency (notification only)
Common Fields
incident_id- PagerDuty incident ID (e.g.,Q26N8MQQHA6R0P)incident_number- Human-readable number (e.g.,2914407)service- Affected serviceassigned_to- List of assigned usershtml_url- Link to incident in PagerDuty web UI
š Security
API Token Security
ā Store token in environment variable (NOT in code)
ā Use
.gitignoreto prevent token commitsā Token has same permissions as your PagerDuty user
ā Audit trail: All actions logged with your email
Read-Only Tools
Safe to use without confirmation:
list_incidentsget_incidentget_my_incidentsget_incident_alertsget_incident_timelineget_oncall
Write Tools (Require Confirmation)
acknowledge_incident- Marks incident as acknowledgedresolve_incident- Closes incidentadd_incident_note- Adds investigation notes
š Troubleshooting
"Missing PAGERDUTY_API_TOKEN"
# Check environment variable
echo $PAGERDUTY_API_TOKEN
# If empty, set it
export PAGERDUTY_API_TOKEN="u+your-token-here"
source ~/.bashrc"Authentication failed"
Token expired or invalid
Get new token from PagerDuty User Settings
Verify token starts with
u+ory1_
"No incidents found"
Check filters (status, urgency)
Verify you have access to incidents
Try without filters:
list_incidents(limit=10)
MCP Server Not Loading
Restart Claude Desktop/Code
Check config file path
Verify
uvis installed:uv --versionCheck logs:
tail -f ~/.config/Claude/logs/mcp*.log
šÆ Use Cases
1. Morning Incident Check
"Show me all active PagerDuty incidents from the last 24 hours"2. On-Call Handoff
"Who is currently on-call? Show all open incidents."3. Incident Investigation
"Get incident Q26N8MQQHA6R0P details, alerts, and timeline"4. Alert Analysis
"Show all alerts for incident XYZ and summarize the root cause"5. Team Status
"List all triggered incidents for my team"š Integration with ServiceNow (Future)
Planned feature: Create ServiceNow incidents from PagerDuty alerts
PagerDuty Incident
ā
Claude AI (parses alert)
ā
ServiceNow MCP (create incident)
ā
Link PagerDuty ā ServiceNowš¤ Contributing
See CONTRIBUTING.md.
š License
Apache License 2.0 - see LICENSE file.
Last updated: 2026-03-11
Available Tools
9 toolsacknowledge_incidentA
Acknowledge an incident (mark as working on it).
Args: incident_id: PagerDuty incident ID note: Optional acknowledgement note
Returns: Dict: Updated incident information
Inputs: incident_id (required), note. Returns: result
add_incident_noteA
Add a note to an incident (for investigation updates, findings, etc.).
Args: incident_id: PagerDuty incident ID note: Note content
Returns: Dict: Created note information
Inputs: note (required), incident_id (required). Returns: result
get_incidentA
Get detailed information about a specific incident.
Args: incident_id: PagerDuty incident ID (e.g., 'Q26N8MQQHA6R0P')
Returns: Dict: Full incident details including description, timeline, alerts
Inputs: incident_id (required). Returns: result
get_incident_alertsA
Get all alerts associated with an incident.
Args: incident_id: PagerDuty incident ID
Returns: Dict with keys: - alerts: List of alert details - total: Count of alerts
Inputs: incident_id (required). Returns: result
get_incident_timelineA
Get incident activity timeline (all status changes, notes, acknowledgements).
Args: incident_id: PagerDuty incident ID
Returns: Dict with keys: - timeline: List of log entries (chronological) - total: Count of entries
Inputs: incident_id (required). Returns: result
get_my_incidentsA
Get incidents assigned to the current user.
Returns: Dict with keys: - incidents: List of assigned incidents - total: Count of assigned incidents - user_email: Current user email
Inputs: no named parameters. Returns: result
get_oncallA
Get current on-call schedules.
Returns: Dict with keys: - oncalls: List of current on-call assignments - total: Count of on-call entries
Inputs: no named parameters. Returns: result
list_incidentsA
List PagerDuty incidents with optional filters.
Args: status: Filter by status (triggered, acknowledged, resolved) urgency: Filter by urgency (high, low) limit: Maximum number of incidents to return (default: 25, max: 100)
Returns: Dict with keys: - incidents: List of incident summaries - total: Total count - statuses_available: Valid status values - urgencies_available: Valid urgency values
Inputs: limit, status, urgency. Returns: result
resolve_incidentC
Resolve an incident with resolution notes.
Args: incident_id: PagerDuty incident ID resolution: Resolution notes explaining how the incident was fixed
Returns: Dict: Updated incident information
Inputs: resolution (required), incident_id (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 9 tools
Each tool targets a distinct resource and action: specific incident retrieval, user-specific incident listing, general listing, and incident lifecycle actions (acknowledge, resolve, note) are clearly separated. Specialized views like alerts and timeline also have unique purposes with no overlap.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., get_incident, resolve_incident, list_incidents). The only slight deviation is get_my_incidents and get_oncall, but they still fit the verb_noun convention clearly.
With 9 tools, the server is well-scoped for incident management and on-call visibility. Each tool serves a distinct purpose without redundancy or unnecessary bloat.
The server covers the core incident lifecycle: list, view, acknowledge, resolve, add notes, plus related context (alerts, timeline, on-call). However, it lacks the ability to create or reassign incidents, which are common operational actions, representing a minor gap.
Maintenance
Related MCP Connectors
Manage incidents and on-call: list/create/update incidents, who is on call, on-call overrides.
Manage uptime monitors and incidents and search logs, metrics and traces from an AI assistant.
Give AI agents secure access to RevDesk calling, SMS, phone numbers, caller IDs, and usage.
Enables AI assistants to retrieve event data and execute event management operations in Nunify.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables PagerDuty incident response operations including listing incidents, acknowledging and resolving incidents, looking up on-call schedules, and listing services.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with PagerDuty services, incidents, schedules, and on-call management through natural language.MIT
- AlicenseAqualityBmaintenanceEnables read-only access to AlertOps incident alerting and on-call data, including alerts, users, groups, integrations, and schedules, for AI assistants.11Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to read incidents, alerts, on-call schedules, teams, severities and API user info, and ā on explicit request ā declare, update and resolve incidents, manage alerts, and create or update teams through the Rootly REST API. It is stateless and multi-tenant, taking the API token as a per-request HTTP header that is never stored.Apache 2.0