PagerDuty MCP Server
Create a powerful Model Context Protocol (MCP) server for PagerDuty in minutes with our AI Gateway. This guide walks you through setting up seamless incident management integration with enterprise-grade security and instant OAuth authentication.
About PagerDuty API
PagerDuty is the leading incident management platform that helps teams detect and respond to infrastructure and application issues. The PagerDuty API enables comprehensive automation of incident response workflows, on-call scheduling, and alerting.
Key Capabilities
- Incident Management: Create, update, acknowledge, and resolve incidents
- On-Call Scheduling: Manage complex schedules and rotations
- Escalation Policies: Configure intelligent alert routing and escalation
- Service Management: Monitor service health and dependencies
- Alert Grouping: Intelligent alert correlation and noise reduction
- Analytics: Comprehensive incident metrics and MTTR reports
- Team Management: User and team administration
- Integration Hub: 650+ tool integrations with monitoring platforms
API Features
- REST API v2: Comprehensive JSON-based operations
- Events API v2: High-volume alert ingestion
- Webhooks v3: Real-time event notifications
- OAuth 2.0: Secure scoped authentication
- Rate Limiting: 960 requests/minute with burst allowance
- Pagination: Efficient large dataset retrieval
- Bulk Operations: Batch incident and schedule updates
- Change Events: Deployment and change tracking
What You Can Do with PagerDuty MCP Server
The MCP server transforms PagerDuty's API into a natural language interface, enabling AI agents to:
Incident Management
-
Incident Operations
- "Create P1 incident for database outage"
- "Acknowledge incident #INC-123"
- "Resolve all incidents for web service"
- "Escalate unacknowledged incidents"
-
Incident Details
- "Show all active incidents"
- "Get incident timeline and notes"
- "Find incidents triggered in last hour"
- "List incidents by priority"
-
Incident Assignment
- "Assign incident to on-call engineer"
- "Reassign to specific user"
- "Add responders to major incident"
- "Remove inactive responders"
On-Call Management
-
Schedule Operations
- "Show who's on-call for database team"
- "Create rotation schedule for SRE team"
- "Add coverage for holiday period"
- "Swap on-call shifts between engineers"
-
Override Management
- "Override schedule for emergency"
- "Set vacation override for next week"
- "Remove expired overrides"
- "Bulk create overrides"
-
Schedule Analytics
- "Show on-call hours per person"
- "Calculate on-call balance"
- "Find gaps in coverage"
- "Export schedule for payroll"
Alert & Event Management
-
Alert Configuration
- "Create alert for high CPU usage"
- "Update alert thresholds"
- "Disable alerts during maintenance"
- "Configure alert grouping"
-
Event Processing
- "Send critical event to PagerDuty"
- "Create change event for deployment"
- "Suppress alerts for known issue"
- "Correlate related alerts"
-
Alert Rules
- "Route database alerts to DBA team"
- "Set up intelligent alert grouping"
- "Configure auto-resolution rules"
- "Create event orchestration"
Team & User Management
-
Team Operations
- "Create team for new project"
- "Add users to incident response team"
- "Update team escalation policy"
- "Configure team analytics"
-
User Management
- "Onboard new on-call engineer"
- "Update user contact methods"
- "Set notification preferences"
- "Deactivate departed employee"
-
Contact Methods
- "Add SMS number for critical alerts"
- "Configure voice call for P1"
- "Set up push notifications"
- "Test contact methods"
Analytics & Reporting
-
Incident Analytics
- "Show MTTR for last quarter"
- "Track incident frequency trends"
- "Analyze incidents by service"
- "Calculate on-call load"
-
Performance Metrics
- "Generate SLA compliance report"
- "Show response time statistics"
- "Track escalation effectiveness"
- "Measure alert noise ratio"
-
Business Metrics
- "Calculate incident cost impact"
- "Show service reliability scores"
- "Track improvement over time"
- "Generate executive reports"
Automation & Integration
-
Workflow Automation
- "Auto-create JIRA ticket for P1 incidents"
- "Send Slack notification for new incidents"
- "Update status page automatically"
- "Trigger runbook execution"
-
Response Automation
- "Execute remediation scripts"
- "Auto-acknowledge low priority alerts"
- "Escalate based on response time"
- "Create follow-up tasks"
-
Integration Management
- "Configure monitoring tool integration"
- "Set up webhook endpoints"
- "Map external severity levels"
- "Test integration health"
Prerequisites
- Access to Cequence AI Gateway
- PagerDuty account with appropriate plan
- Admin or account owner permissions
- OAuth app registration capabilities
OAuth 2.0 Scopes Reference
PagerDuty OAuth 2.0 uses scopes to define the level of access granted to your application. Understanding these scopes is crucial for proper API integration and security.
Core Access Scopes
abilities.read
- Description: Allows reading account abilities and feature flags
- Access: Account-level feature configuration, API capabilities
- Use Cases: Feature detection, capability validation
- Security: Read-only access to account settings
escalation_policies.read
- Description: Allows reading escalation policy configurations
- Access: Escalation rules, target assignments, policy structure
- Use Cases: Understanding alert routing, policy analysis
- Security: Read-only access to escalation configurations
incidents.read
- Description: Allows reading incident data and details
- Access: Incident status, assignments, timeline, notes
- Use Cases: Incident monitoring, reporting, analysis
- Security: Read-only access to incident information
incidents.write
- Description: Allows creating and modifying incidents
- Access: Create incidents, update status, assign responders
- Use Cases: Automated incident creation, status updates
- Security: Full write access to incident lifecycle
Team and User Management
oncalls.read
- Description: Allows reading on-call schedule information
- Access: Current on-call assignments, schedule details
- Use Cases: On-call lookups, schedule validation
- Security: Read-only access to on-call data
priorities.read
- Description: Allows reading incident priority configurations
- Access: Priority levels, descriptions, color coding
- Use Cases: Priority assignment, incident classification
- Security: Read-only access to priority settings
schedules.read
- Description: Allows reading schedule configurations and assignments
- Access: Schedule layers, rotations, overrides
- Use Cases: Schedule analysis, coverage planning
- Security: Read-only access to schedule data
schedules.write
- Description: Allows creating and modifying schedules
- Access: Create schedules, manage overrides, update rotations
- Use Cases: Schedule automation, coverage management
- Security: Full write access to schedule configuration
Service and Team Operations
services.read
- Description: Allows reading service configurations and status
- Access: Service details, integrations, escalation policies
- Use Cases: Service monitoring, configuration analysis
- Security: Read-only access to service data
services.write
- Description: Allows creating and modifying services
- Access: Create services, update configurations, manage integrations
- Use Cases: Service automation, configuration management
- Security: Full write access to service settings
teams.read
- Description: Allows reading team information and membership
- Access: Team details, member lists, team relationships
- Use Cases: Team analysis, membership validation
- Security: Read-only access to team data
teams.write
- Description: Allows creating and modifying teams
- Access: Create teams, manage membership, update settings
- Use Cases: Team automation, membership management
- Security: Full write access to team configuration
User Management
users.read
- Description: Allows reading user profiles and contact information
- Access: User details, contact methods, notification rules
- Use Cases: User lookups, contact validation
- Security: Read-only access to user data
users.write
- Description: Allows creating and modifying user accounts
- Access: Create users, update profiles, manage contact methods
- Use Cases: User provisioning, profile management
- Security: Full write access to user accounts
Step 1: Configure PagerDuty OAuth App
Prerequisites
- PagerDuty account with Admin or Account Owner permissions
- Access to PagerDuty's Developer Tools
- Understanding of OAuth 2.0 flow requirements
1.1 Access PagerDuty App Registration
- Log into your PagerDuty account
- Navigate to Integrations → Developer Tools
- Click App Registration in the left sidebar
- Click + New App button
1.2 Configure Basic Application Details
- Fill out the application information:
- App Name: "AI Gateway PagerDuty Integration"
- Brief Description: "MCP server integration for incident management and on-call operations"
- Category: Select "Monitoring & Alerting"
- Website: Your organization's website (optional)
1.3 Enable OAuth 2.0 Functionality
- Under Functionality, check OAuth 2.0
- Click Next to proceed to OAuth configuration
1.4 Configure OAuth Settings
- OAuth Type: Select Scoped OAuth (recommended for modern integrations)
- Redirect URLs: Add the callback URL:
https://auth.aigateway.cequence.ai/v1/outbound/oauth/callback
1.5 Select Required OAuth Scopes
Select the minimum required scopes for your integration:
Essential Scopes (minimum required):
- ✅
abilities.read
- Read account abilities - ✅
incidents.read
- Read incident information - ✅
incidents.write
- Create and modify incidents - ✅
oncalls.read
- Read on-call information - ✅
users.read
- Read user profiles
Additional Recommended Scopes:
- ✅
escalation_policies.read
- Read escalation policies - ✅
priorities.read
- Read incident priorities - ✅
schedules.read
- Read schedule information - ✅
schedules.write
- Manage schedules and overrides - ✅
services.read
- Read service configurations - ✅
services.write
- Manage service settings - ✅
teams.read
- Read team information - ✅
teams.write
- Manage team membership - ✅
users.write
- Manage user accounts
1.6 Complete App Registration
- Review your OAuth scope selections
- Click Create App to finalize registration
- You'll be redirected to the app details page
1.7 Retrieve OAuth Credentials
After successful creation, retrieve your credentials:
-
Client ID
- Found on the app details page
- Copy this value for OAuth configuration
- This is your public application identifier
-
Client Secret
- Click Show next to Client Secret
- Copy this secure value immediately
- Store securely - this cannot be retrieved again
1.8 OAuth Configuration for AI Gateway
Authorization URL:
https://app.pagerduty.com/oauth/authorize
Token URL:
https://app.pagerduty.com/oauth/token
Required OAuth Parameters:
- Client ID: Your App's Client ID from registration
- Client Secret: Your App's Client Secret from registration
- Redirect URI:
https://auth.aigateway.cequence.ai/v1/outbound/oauth/callback
- Scopes: Space-separated list from selected scopes above
Common Issues & Solutions
Issue | Solution |
---|---|
"Invalid Client ID" | Ensure you're using the Client ID, not the Client Secret |
"Redirect URI Mismatch" | Callback URL must exactly match the registered redirect URL |
"Insufficient Permissions" | Ensure your PagerDuty account has admin privileges |
"Invalid Scope" | Verify selected scopes match your app's configured permissions |
Security Best Practices
- ✅ Keep your Client Secret secure - never expose it in client-side code
- ✅ Use HTTPS for all redirect URLs in production
- ✅ Implement proper token refresh logic for long-running integrations
- ✅ Use minimal required scopes - only request what you need
- ✅ Regularly audit and rotate OAuth credentials
- ✅ Monitor OAuth token usage through PagerDuty's audit logs
Step 2: Access AI Gateway
- Navigate to AI Gateway Console
- Sign in with your account credentials
- Select your organization workspace
Step 3: Find PagerDuty API
- Click "Create New Integration"
- Search for "PagerDuty" in the API catalog
- Select "PagerDuty REST API v2"
- Click "Create MCP Server"
Step 4: Create MCP Server
- Choose your integration template
- Configure server settings
- Set up authentication parameters
Step 5: Configure API Endpoints
- Base URL: Enter PagerDuty's API endpoint
https://api.pagerduty.com
- API Version: Select
v2
(current stable version) - Select required endpoints for your integration
- Click Next
Step 6: MCP Server Configuration
- Server Name: "PagerDuty Incident Management"
- Description: "AI Gateway integration for PagerDuty APIs"
- Environment: Select Production
- Click Next
Step 7: Configure OAuth Authentication
- Authentication Type: OAuth 2.0
- Authorization URL:
https://app.pagerduty.com/oauth/authorize
- Token URL:
https://app.pagerduty.com/oauth/token
- Client ID: Enter your Client ID from OAuth App
- Client Secret: Enter your Client Secret from OAuth App
- Scopes: Select required OAuth scopes:
abilities.read
- Read account abilitiesescalation_policies.read
- Read escalation policiesincidents.read
- Read incident informationincidents.write
- Create and modify incidentsoncalls.read
- Read on-call informationpriorities.read
- Read incident prioritiesschedules.read
- Read schedule informationschedules.write
- Manage schedules and overridesservices.read
- Read service configurationsservices.write
- Manage service settingsteams.read
- Read team informationteams.write
- Manage team membershipusers.read
- Read user profilesusers.write
- Manage user accounts
Available PagerDuty API Operations
Based on the PagerDuty REST API v2 specification, your AI Gateway MCP server provides access to comprehensive incident management functionality:
Core Resource Operations
- API Version Discovery
- Discover available API versions and capabilities
- Access API resource listings and documentation links
Incident Management Operations
-
Incident Lifecycle
listIncidents
- List incidents with filtering, sorting, and paginationcreateIncident
- Create new incidents with full incident detailsgetIncident
- Retrieve detailed information about specific incidentsupdateIncident
- Update incident status, assignments, and details- Support for incident status management (triggered, acknowledged, resolved)
-
Incident Filtering & Search
- Filter by status: triggered, acknowledged, resolved
- Filter by date ranges with
since
anduntil
parameters - Filter by service IDs, team IDs, and user IDs
- Filter by urgency levels (high, low)
- Sort by incident number, creation date, resolution date, urgency
- Include related data: users, services, priorities, escalation policies
-
Incident Assignment & Response
- Incident assignment to users and escalation policies
- Acknowledgment and resolution workflows
- Incident notes and timeline management
- Responder request and coordination
Service Management Operations
-
Service Configuration
listServices
- Get all services with search and filteringcreateService
- Create new services with escalation policiesgetService
- Retrieve service details and configurationsupdateService
- Update service settings and integrationsdeleteService
- Remove services from the system
-
Service Features
- Escalation policy assignment and management
- Service status monitoring and alerting
- Integration configuration for monitoring tools
- Team assignment and service ownership
- Auto-resolve and acknowledgment timeout settings
User Management Operations
-
User Administration
listUsers
- Get users with search, filtering, and team associationcreateUser
- Create new user accounts with full profile datagetUser
- Retrieve user details, contact methods, and preferencesupdateUser
- Update user profiles and settingsdeleteUser
- Remove users from the account
-
User Features
- Contact method management (email, SMS, phone, push)
- Notification rule configuration
- Team membership management
- Role and permission assignment
- Time zone and personal preference settings
Schedule Management Operations
-
Schedule Administration
listSchedules
- Get all schedules with search capabilitiescreateSchedule
- Create new on-call schedules with rotation layersgetSchedule
- Retrieve schedule details with time range filteringupdateSchedule
- Modify schedule configurations and layersdeleteSchedule
- Remove schedules from the system
-
Schedule Features
- Multi-layer schedule support with complex rotations
- Schedule override management for temporary changes
- Time zone handling for global teams
- User rotation and coverage tracking
- Integration with escalation policies
Team Management Operations
-
Team Organization
listTeams
- Get all teams with search and paginationcreateTeam
- Create new teams with hierarchy supportgetTeam
- Retrieve team details and membershipupdateTeam
- Modify team settings and structuredeleteTeam
- Remove teams from the organization
-
Team Features
- Hierarchical team structure with parent-child relationships
- Team member assignment and role management
- Team-specific escalation policies and services
- Default role configuration for new members
Escalation Policy Operations
-
Policy Configuration
listEscalationPolicies
- Get escalation policies with filtering- Advanced filtering by users, teams, and services
- Escalation rule and target management
- Policy sorting and search capabilities
-
Policy Features
- Multi-step escalation with delay configuration
- Target assignment (users, schedules, teams)
- Service association and policy inheritance
- Loop configuration for repeated escalations
Query & Filtering Capabilities
-
Advanced Filtering
- Date range filtering with flexible time zone support
- Multi-value filtering for IDs, statuses, and categories
- Text search across names, descriptions, and summaries
- Include/exclude parameters for related data retrieval
-
Pagination & Performance
- Configurable page sizes (1-100 items)
- Offset-based pagination for large datasets
- Optional total count calculation for performance
- Efficient data loading with selective field inclusion
Authentication & Security
- OAuth 2.0 Integration
- Scoped access control with granular permissions
- Token-based authentication with refresh capability
- Secure API key authentication for service accounts
- Role-based access control integration
Error Handling & Validation
- Comprehensive Error Management
- Detailed error responses with specific error codes
- Field validation with descriptive error messages
- Permission and access control error handling
- Rate limiting and quota management responses
Data Relationships & Integration
-
Cross-Object References
- Service to escalation policy relationships
- User to team and schedule associations
- Incident to service and user linkage
- Team to escalation policy connections
-
Bulk Operations Support
- Efficient batch processing for large-scale operations
- Bulk user and service management
- Mass incident updates and assignments
Step 8: Security Configuration
- Access Control: Configure user permissions and role-based access
- Rate Limiting: Set API call limits to respect PagerDuty's quotas
- Monitoring: Enable request logging and audit trails
- Click Next
Step 9: Review & Deploy
- Review all configuration settings
- Test the OAuth connection with PagerDuty
- Verify scope permissions and API endpoints
- Deploy Server: Click "Deploy MCP Server"
Step 10: Verification
- Confirm server deployment status
- Test API connectivity with PagerDuty
- Verify OAuth token refresh functionality
- Test incident creation and retrieval operations
Natural Language Commands
- "Show all active P1 incidents"
- "Who's on-call for the database team?"
- "Create incident for API service degradation"
- "Acknowledge all incidents assigned to me"
- "Generate MTTR report for last month"
Common Use Cases
Incident Response
- Automated incident creation
- Smart alert routing
- Response coordination
- Post-incident analysis
On-Call Management
- Fair rotation scheduling
- Coverage optimization
- Override handling
- Burnout prevention
Alert Optimization
- Noise reduction
- Alert correlation
- Threshold tuning
- False positive management
Reporting & Analytics
- SLA tracking
- MTTR analysis
- On-call metrics
- Cost analysis
Security Best Practices
-
OAuth Security:
- Use minimal scopes
- Rotate credentials
- Monitor token usage
- Implement IP restrictions
-
Incident Security:
- Limit incident creation
- Audit status changes
- Control data access
- Secure webhooks
-
Access Control:
- Role-based permissions
- Team isolation
- Service restrictions
- User auditing
Troubleshooting
Common Issues
-
Authentication Errors
- Verify OAuth credentials
- Check token expiration
- Validate scopes
- Review app status
-
Rate Limiting
- Monitor API usage
- Implement caching
- Use bulk operations
- Add retry logic
-
Permission Issues
- Check user roles
- Verify team access
- Review service permissions
- Validate OAuth scopes
Getting Help
- Documentation: AI Gateway Docs
- Support: support@cequence.ai
- PagerDuty Docs: developer.pagerduty.com
- API Reference: PagerDuty API v2