PagerDuty MCP Server Integration Guide
Connect AI tools to PagerDuty with MCP to securely manage incidents, services and on-call schedules
The PagerDuty Model Context Protocol (MCP) Server enables AI assistants and language models to interact directly with your PagerDuty account through a standardized protocol. This integration allows AI tools to retrieve incident data, manage services, update on-call schedules, and perform other PagerDuty operations on your behalf.
MCP Server Integration Benefits
PagerDuty offers two ways to integrate with MCP:
- PagerDuty-Hosted MCP Service: A managed service hosted by PagerDuty at
mcp.pagerduty.com/mcp
. - Self-Hosted Open Source Server: Run your own MCP server using our open source implementation.
Benefits of the PagerDuty-Hosted Service
- No Infrastructure Management: PagerDuty manages the server infrastructure.
- Automatic Updates: Always running the latest version with new features.
- High Availability: Enterprise-grade uptime and reliability.
- Optimized Performance: Direct connection to PagerDuty APIs.
Benefits of the Self-Hosted Open Source Server
- Control and Customization: Full control over deployment, customization and security to meet your organization’s specific requirements.
- On-Premises and Private Cloud Deployment: Ability to run on-premises or in your own cloud, ensuring data stays within your environment.
- Open Source and Extensible: Open source flexibility with community support, and the option to contribute or extend functionality.
Requirements
Before setting up either MCP option, ensure you have:
- PagerDuty Account Access: A valid PagerDuty account with Advanced Permissions.
- API Token: A PagerDuty User API token.
- MCP Client: An MCP-compatible AI assistant or application (e.g., Claude Desktop, VS Code, Cursor).
How it Works
- The Model Context Protocol (MCP) is an open standard that enables secure, controlled access to external tools and data sources from AI applications.
- The PagerDuty MCP Server implements this protocol to provide AI assistants with structured access to your PagerDuty environment.
Integration Walkthrough
Generate Your PagerDuty API Token
- In your PagerDuty account, navigate to your User Profile icon My Profile User Settings.
- In the API Access section, click Create API User Token and follow the prompts to generate a new token.
- Copy the generated token from the modal and store it securely, as you will not have access after closing.
Security Note
Your API token provides access to your PagerDuty account data. Keep it secure and never commit it to version control. Use of the PagerDuty User API Token is subject to the PagerDuty Developer Agreement.
Option 1: PagerDuty-Hosted MCP Service
The hosted MCP service provides a managed endpoint that connects your AI assistant to PagerDuty without requiring you to run your own server infrastructure.
PagerDuty-Hosted MCP Configuration
Add the hosted MCP service to your MCP client configuration:
Claude Desktop Configuration
Edit your Claude Desktop configuration file:
- macOS/Linux:
~/.config/claude-desktop/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"pagerduty-hosted": {
"url": "https://mcp.pagerduty.com/mcp",
"headers": {
"Authorization": "Token your-pagerduty-api-token-here"
}
}
}
}
VS Code Configuration
Add to your VS Code settings.json
:
{
"mcp.servers": {
"pagerduty-hosted": {
"url": "https://mcp.pagerduty.com/mcp",
"headers": {
"Authorization": "Token your-pagerduty-api-token-here"
}
}
}
}
Option 2: Self-Hosted Open Source Server
The self-hosted option gives you full control over the MCP server and allows for customization and on-premises deployment. For complete installation instructions, system requirements, and setup guidance, please refer to the PagerDuty MCP Server repository on GitHub.
EU Service Region
If your PagerDuty account is located in the EU, update the API host to
https://api.eu.pagerduty.com
in your configuration.
Write Operations
By default, the MCP server only exposes read-only tools. To enable tools that can modify your PagerDuty account, you must explicitly start the server with the
--enable-write-tools
flag. This helps prevent accidental changes to your PagerDuty data.
MCP Client Configuration
Claude Desktop Configuration:
{
"mcpServers": {
"pagerduty-mcp": {
"command": "uvx",
"args": ["pagerduty-mcp", "--enable-write-tools"],
"env": {
"PAGERDUTY_USER_API_KEY": "your-pagerduty-api-token-here",
"PAGERDUTY_API_HOST": "https://api.pagerduty.com"
}
}
}
}
VS Code Configuration:
Add to your VS Code settings.json
file:
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "pagerduty-api-key",
"description": "PagerDuty API Key",
"password": true
}
],
"servers": {
"pagerduty-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"pagerduty-mcp",
"--enable-write-tools"
],
"env": {
"PAGERDUTY_USER_API_KEY": "${input:pagerduty-api-key}",
"PAGERDUTY_API_HOST": "https://api.pagerduty.com"
}
}
}
}
}
Cursor Configuration:
Global configuration in ~/.cursor/mcp.json
:
{
"mcpServers": {
"pagerduty-mcp-server": {
"command": "uvx",
"args": ["pagerduty-mcp", "--enable-write-tools"],
"env": {
"PAGERDUTY_USER_API_KEY": "your-pagerduty-api-token-here",
"PAGERDUTY_API_HOST": "https://api.pagerduty.com"
}
}
}
}
PagerDuty Tools
Both hosted and self-hosted options provide access to the following PagerDuty tools. The table below shows all available tools, categorized by function area and whether they perform read-only or write operations:
Function Area | Tool | Description | Read-only |
---|---|---|---|
Escalation Policies: | list_escalation_policies | Lists escalation policies | |
get_escalation_policy | Retrieves a specific escalation policy | ||
Incidents: | get_incident | Retrieves a specific incident | |
list_incidents | Lists incidents | ||
add_note_to_incident | Adds note to an incident | ||
add_responders | Adds responders to an incident | ||
create_incident | Creates a new incident | ||
manage_incidents | Updates status, urgency, assignment, or escalation level | ||
On-Call: | list_oncalls | Lists on-call schedules | |
Schedules: | get_schedule | Retrieves a specific schedule | |
list_schedule_users | Lists users in a schedule | ||
list_schedules | Lists schedules | ||
create_schedule_override | Creates an override for a schedule | ||
Services: | get_service | Retrieves a specific service | |
list_services | Lists services | ||
create_service | Creates a new service | ||
update_service | Updates an existing service | ||
Teams: | get_team | Retrieves a specific team | |
list_team_members | Lists members of a team | ||
list_teams | Lists teams | ||
add_team_member | Adds a user to a team with a specific role | ||
create_team | Creates a new team | ||
delete_team | Deletes a team | ||
remove_team_member | Removes a user from a team | ||
update_team | Updates an existing team | ||
Users: | get_user_data | Gets the current user's data | |
list_users | Lists users in the PagerDuty account |
Verification and Testing
After configuring your chosen MCP option, verify it's working correctly:
- Restart Your MCP Client: Completely restart your AI assistant application.
- Test Basic Connectivity: Try asking your AI assistant:
Show me my latest PagerDuty incidents
. - Verify Available Tools: In supported clients, check that PagerDuty tools are listed and available.
Usage Examples
Once configured, you can interact with PagerDuty through natural language commands:
Common Commands
- "Show me all open incidents assigned to me"
- "What are the high urgency incidents from the last 24 hours?"
- "Create a new incident for the API service with title 'Database connection timeout'"
- "Acknowledge incident #PD12345 and add a note about investigating the root cause"
- "Who's currently on call for the platform team?"
- "Show me the escalation policy for the web service"
Advanced Queries
- "List all incidents created in the last week with their resolution times"
- "Show me services that don't have any recent incidents"
- "Find all incidents related to the database service that were resolved in the last month"
Security and Permissions
API Token Permissions
Your PagerDuty User API Token provides access based on your account permissions. The MCP server can perform operations that you can perform through the PagerDuty web interface or REST API.
Best Practices
- Use User Tokens: Prefer User API tokens over General Access tokens for better audit trails.
- Principle of Least Privilege: Only grant the minimum permissions necessary.
- Token Rotation: Regularly rotate API tokens according to your security policies.
- Monitor Usage: Review API usage through PagerDuty's audit logs.
- Secure Storage: Store tokens securely and never commit them to version control.
Troubleshooting
Authentication Errors
- Verify your API token is correct and has not expired.
- Check that the token has necessary permissions for the requested operations.
- Ensure the token format is correct (User tokens vs General Access tokens).
Connection Issues
- For self-hosted: Ensure the server is running and accessible.
- For hosted service: Verify network connectivity to
mcp.pagerduty.com
. - Check firewall settings allow outbound HTTPS connections.
MCP Client Issues
- Restart your MCP client application completely.
- Check configuration file syntax (JSON formatting).
- Verify file paths and environment variables.
Getting Help
For Self-Hosted Server Issues:
- Visit the GitHub repository
- Open issues or search existing discussions
- Check the Community Forum
For Hosted Service Issues:
- Contact PagerDuty Support through the Support Center
- Use the in-app chat support in your PagerDuty account
For API and Developer Questions:
- Review the PagerDuty Developer Documentation
- Check API-specific guides for Events API v2 and REST API usage
Advanced Configuration
Rate Limiting
Both MCP options respect PagerDuty's API rate limits:
- REST API: Rate limits vary by plan and endpoint.
- Events API v2: Higher limits for event ingestion.
- For more information, see REST API Rate Limits in our developer documentation.
Custom Filtering
The MCP servers support advanced filtering options:
- Current User Context: Automatically filter results based on the authenticated user.
- Date Ranges: Filter incidents, schedules, and other resources by time periods.
- Service and Team Filtering: Scope results to specific services or teams.
- Status Filtering: Filter by incident status, urgency, or other criteria.
Support
Community Support (Self-Hosted)
PagerDuty's MCP server is an open-source project offering community-based support:
PagerDuty Support (Hosted Service)
For the hosted MCP service, contact PagerDuty Support:
- Support Center
- In-App Support: Use the chat feature in your PagerDuty account.
- Phone Support: Available based on your support plan.
Updated about 3 hours ago