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, and resolve incidents
  • On-Call Scheduling: Manage schedules and rotations
  • Escalation Policies: Configure alert routing
  • Service Management: Monitor service health
  • Alert Grouping: Intelligent alert correlation
  • Analytics: Incident metrics and reports
  • Integrations: 650+ tool integrations
  • Mobile Response: iOS/Android incident management

API Features

  • REST API v2: Comprehensive operations
  • Events API v2: Alert ingestion
  • Webhooks: Real-time notifications
  • OAuth 2.0: Secure authentication
  • Rate Limiting: 960 requests/minute
  • Pagination: Efficient data retrieval
  • Bulk Operations: Batch updates
  • Change Events: Track deployments

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

Step 1: Create PagerDuty OAuth App

1.1 Access PagerDuty Developer Portal

  1. Log in to your PagerDuty account
  2. Navigate to Configuration Developer Tools
  3. Click Create New App

1.2 Configure OAuth Application

  1. Fill in app details:

    • Name: "AI Gateway PagerDuty MCP"
    • Description: "MCP server for incident management"
    • Category: Select appropriate category
  2. OAuth Settings:

    • Redirect URL:
      https://auth.aigateway.cequence.ai/v1/outbound/oauth/callback

1.3 Set Permissions

Select required scopes:

  • Incidents (Read/Write)
  • Users (Read/Write)
  • Teams (Read/Write)
  • Schedules (Read/Write)
  • Escalation Policies (Read/Write)
  • Services (Read/Write)
  • Analytics (Read)

1.4 Get Credentials

  1. After creation, go to app details
  2. Copy Client ID
  3. Copy Client Secret
  4. Note OAuth endpoints

Step 2-4: Standard Setup

Follow standard steps to access AI Gateway, find PagerDuty API, and create MCP server.

Step 5: Configure API Endpoints

  1. Base URL: https://api.pagerduty.com
  2. Select endpoints to expose
  3. Click Next

Step 6: MCP Server Configuration

  1. Name: "PagerDuty Incident Management"
  2. Description: "On-call scheduling and incident response"
  3. Configure production mode
  4. Click Next

Step 7: Configure 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. Enter Client ID and Secret
  5. Select required scopes

Available PagerDuty OAuth Scopes

Incident Management

  • incidents.read

    • View incidents
    • Access incident details
    • Read incident logs
    • Get analytics
  • incidents.write

    • Create incidents
    • Update status
    • Add notes
    • Manage assignments

User & Team Access

  • users.read

    • View user profiles
    • Access contact info
    • Check on-call status
    • Read preferences
  • teams.read / teams.write

    • Manage teams
    • Update membership
    • Configure policies
    • Set permissions

Schedule Management

  • schedules.read / schedules.write
    • View schedules
    • Create rotations
    • Manage overrides
    • Update coverage

Service Configuration

  • services.read / services.write
    • Manage services
    • Configure integrations
    • Set dependencies
    • Update settings

For Incident Response:

incidents.read
incidents.write
users.read
schedules.read
services.read

For Full Administration:

incidents.read
incidents.write
users.read
users.write
teams.read
teams.write
schedules.read
schedules.write
services.read
services.write
analytics.read

Step 8-10: Complete Setup

Configure security, choose deployment, and deploy.

Using Your PagerDuty MCP Server

With Claude Desktop

{
"servers": {
"pagerduty": {
"url": "your-mcp-server-url",
"auth": {
"type": "oauth2",
"client_id": "your-client-id"
}
}
}
}

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"

API Integration Example

// Initialize MCP client
const mcpClient = new MCPClient({
serverUrl: 'your-mcp-server-url',
auth: {
type: 'oauth2',
token: 'access-token'
}
});

// Create incident
const incident = await mcpClient.pagerduty.incidents.create({
incident: {
type: 'incident',
title: 'Database Connection Pool Exhausted',
service: {
id: 'service-id',
type: 'service_reference'
},
urgency: 'high',
body: {
type: 'incident_body',
details: 'Connection pool limit reached, new connections failing'
}
}
});

// Get on-call user
const oncall = await mcpClient.pagerduty.oncalls.list({
time_zone: 'UTC',
include: ['users'],
schedule_ids: ['schedule-id']
});

// Acknowledge incident
await mcpClient.pagerduty.incidents.update({
id: incident.id,
incident: {
type: 'incident',
status: 'acknowledged'
}
});

// Add responders
await mcpClient.pagerduty.incidents.addResponders({
id: incident.id,
responders: [
{
responder: {
type: 'user',
id: 'user-id'
},
message: 'Need database expertise for this issue'
}
]
});

// Create override
await mcpClient.pagerduty.schedules.createOverride({
id: 'schedule-id',
override: {
start: '2025-02-15T08:00:00Z',
end: '2025-02-15T17:00:00Z',
user: {
id: 'user-id',
type: 'user_reference'
}
}
});

// Get analytics
const analytics = await mcpClient.pagerduty.analytics.getMetrics({
metrics: ['mean_time_to_resolve', 'total_incident_count'],
since: '2025-01-01',
until: '2025-01-31',
group_by: 'service'
});

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