Skip to main content

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

  1. Log into your PagerDuty account
  2. Navigate to IntegrationsDeveloper Tools
  3. Click App Registration in the left sidebar
  4. Click + New App button

1.2 Configure Basic Application Details

  1. 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

  1. Under Functionality, check OAuth 2.0
  2. Click Next to proceed to OAuth configuration

1.4 Configure OAuth Settings

  1. OAuth Type: Select Scoped OAuth (recommended for modern integrations)
  2. 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

  1. Review your OAuth scope selections
  2. Click Create App to finalize registration
  3. You'll be redirected to the app details page

1.7 Retrieve OAuth Credentials

After successful creation, retrieve your credentials:

  1. Client ID

    • Found on the app details page
    • Copy this value for OAuth configuration
    • This is your public application identifier
  2. 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

IssueSolution
"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

  1. Navigate to AI Gateway Console
  2. Sign in with your account credentials
  3. Select your organization workspace

Step 3: Find PagerDuty API

  1. Click "Create New Integration"
  2. Search for "PagerDuty" in the API catalog
  3. Select "PagerDuty REST API v2"
  4. Click "Create MCP Server"

Step 4: Create MCP Server

  1. Choose your integration template
  2. Configure server settings
  3. Set up authentication parameters

Step 5: Configure API Endpoints

  1. Base URL: Enter PagerDuty's API endpoint
    https://api.pagerduty.com
  2. API Version: Select v2 (current stable version)
  3. Select required endpoints for your integration
  4. Click Next

Step 6: MCP Server Configuration

  1. Server Name: "PagerDuty Incident Management"
  2. Description: "AI Gateway integration for PagerDuty APIs"
  3. Environment: Select Production
  4. Click Next

Step 7: Configure OAuth Authentication

  1. Authentication Type: OAuth 2.0
  2. Authorization URL:
    https://app.pagerduty.com/oauth/authorize
  3. Token URL:
    https://app.pagerduty.com/oauth/token
  4. Client ID: Enter your Client ID from OAuth App
  5. Client Secret: Enter your Client Secret from OAuth App
  6. Scopes: Select required OAuth scopes:
    • abilities.read - Read account abilities
    • escalation_policies.read - Read escalation policies
    • incidents.read - Read incident information
    • incidents.write - Create and modify incidents
    • oncalls.read - Read on-call information
    • 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.read - Read user profiles
    • users.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 pagination
    • createIncident - Create new incidents with full incident details
    • getIncident - Retrieve detailed information about specific incidents
    • updateIncident - 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 and until 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 filtering
    • createService - Create new services with escalation policies
    • getService - Retrieve service details and configurations
    • updateService - Update service settings and integrations
    • deleteService - 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 association
    • createUser - Create new user accounts with full profile data
    • getUser - Retrieve user details, contact methods, and preferences
    • updateUser - Update user profiles and settings
    • deleteUser - 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 capabilities
    • createSchedule - Create new on-call schedules with rotation layers
    • getSchedule - Retrieve schedule details with time range filtering
    • updateSchedule - Modify schedule configurations and layers
    • deleteSchedule - 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 pagination
    • createTeam - Create new teams with hierarchy support
    • getTeam - Retrieve team details and membership
    • updateTeam - Modify team settings and structure
    • deleteTeam - 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

  1. Access Control: Configure user permissions and role-based access
  2. Rate Limiting: Set API call limits to respect PagerDuty's quotas
  3. Monitoring: Enable request logging and audit trails
  4. Click Next

Step 9: Review & Deploy

  1. Review all configuration settings
  2. Test the OAuth connection with PagerDuty
  3. Verify scope permissions and API endpoints
  4. Deploy Server: Click "Deploy MCP Server"

Step 10: Verification

  1. Confirm server deployment status
  2. Test API connectivity with PagerDuty
  3. Verify OAuth token refresh functionality
  4. 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

  1. OAuth Security:

    • Use minimal scopes
    • Rotate credentials
    • Monitor token usage
    • Implement IP restrictions
  2. Incident Security:

    • Limit incident creation
    • Audit status changes
    • Control data access
    • Secure webhooks
  3. Access Control:

    • Role-based permissions
    • Team isolation
    • Service restrictions
    • User auditing

Troubleshooting

Common Issues

  1. Authentication Errors

    • Verify OAuth credentials
    • Check token expiration
    • Validate scopes
    • Review app status
  2. Rate Limiting

    • Monitor API usage
    • Implement caching
    • Use bulk operations
    • Add retry logic
  3. Permission Issues

    • Check user roles
    • Verify team access
    • Review service permissions
    • Validate OAuth scopes

Getting Help