← All integrations

PagerDuty MCP integration for AI agents

Anlyon's PagerDuty integration gives an AI agent PagerDuty tools over MCP or through Anlyon's API: it can read incidents, on-call and services, and open and resolve incidents. Each of your users connects their own PagerDuty account with a key they create in PagerDuty, and your company's account connects the same way. Your agent calls each action by name and never holds the key.

Let an agent raise the alarm without letting it raise forty. It opens incidents under a daily ceiling, and resolving one can wait for a person, so an incident does not go quiet on an agent's say-so.

PagerDutysecret · PAGERDUTY
host
api.pagerduty.com
connect
API key, per user
  • Create incident

    pagerduty-create-incident

  • Acknowledge incident

    pagerduty-acknowledge-incident

  • Resolve incident

    pagerduty-resolve-incident

  • Add note

    pagerduty-add-note

writes are off until switched on

What can an AI agent do in PagerDuty? Writes are off until you switch them on.

Each one is a named operation from the pack. Reads change nothing.

Writes

  • Create incident

    read back

    pagerduty-create-incident

    Open one incident on a service, which notifies whoever is on call for it.

  • Acknowledge incident

    read back

    pagerduty-acknowledge-incident

    Acknowledge one incident.

  • Resolve incident

    read back

    pagerduty-resolve-incident

    Resolve one incident, which stops its notifications.

  • Add note

    read back

    pagerduty-add-note

    Add a note to one incident's timeline, visible to everyone who can see the incident (at most 2000 notes per incident).

  • Reassign incident

    read back

    pagerduty-reassign-incident

    Reassign one open incident to one user, replacing its current assignees; PagerDuty notifies the new assignee.

  • Change incident urgency

    read back

    pagerduty-change-incident-urgency

    Change one incident's urgency to high or low, which changes how assignees are notified.

  • Snooze incident

    read back

    pagerduty-snooze-incident

    Snooze one acknowledged incident for a fixed time, after which it returns to triggered and notifies again; PagerDuty refuses to snooze an incident that is not acknowledged.

  • Merge incidents

    read back

    pagerduty-merge-incidents

    Merge one source incident into an open target incident: the target takes the source's alerts and the source is resolved. Only incidents with alerts, or opened by hand, can be merged, and the target must be open.

  • Create maintenance window

    read back

    pagerduty-create-maintenance-window

    Create a maintenance window on one service: between start_time and end_time PagerDuty opens no incidents on it, so nobody is paged for it.

  • End maintenance window

    acknowledged

    pagerduty-end-maintenance-window

    End one maintenance window: PagerDuty deletes a future window and ends an ongoing one now; a window that has already ended cannot be changed.

Reads

  • List incidents

    pagerduty-list-incidents

    List incidents, newest first, 25 per page: title, status, urgency, service and assignees. Without since/until PagerDuty searches the last month, and date_range all searches every date; filter by up to two statuses (pass triggered and acknowledged for every open incident), a service, an assigned user or an urgency. When the response says more is true, pass offset 25, 50 and so on for the next page.

  • Get incident

    pagerduty-get-incident

    Get one incident by its id or incident number: title, status, urgency, service, assignees, acknowledgements, pending actions and alert counts.

  • List incident notes

    pagerduty-list-incident-notes

    List the notes on one incident, newest first, with their author and time. PagerDuty returns every note in one response and has no pagination for notes, so a very long notes history is cut at 64 KB.

  • List incident log entries

    pagerduty-list-incident-log-entries

    List one incident's log entries (triggered, notified, acknowledged, assigned, annotated, snoozed, resolved and so on), 25 per page. is_overview true keeps only the most important changes. When more is true, pass offset 25, 50 and so on for the next page.

  • List incident alerts

    pagerduty-list-incident-alerts

    List the alerts grouped into one incident, 10 per page, including each alert's body and details from the monitoring tool that raised it. Incidents opened by hand have no alerts. When more is true, pass offset 10, 20 and so on for the next page.

  • List services

    pagerduty-list-services

    List services, by name, 25 per page: name, status, escalation policy and teams. Use it to find the service_id an incident is opened on. When more is true, pass offset 25, 50 and so on for the next page.

  • Get service

    pagerduty-get-service

    Get one service: name, description, status (active, warning, critical, maintenance or disabled), escalation policy, urgency rule and timeouts.

  • List oncalls

    pagerduty-list-oncalls

    List who is on call, 25 per page: each entry is a user, the escalation policy and level, the schedule, and the start and end of the shift. Without since/until it shows who is on call now; filter by escalation policy, schedule or user, and earliest true keeps only the next shift per user and level. When more is true, pass offset 25, 50 and so on for the next page.

  • List escalation policies

    pagerduty-list-escalation-policies

    List escalation policies, by name, 25 per page, each with its escalation rules and targets and the services that use it. When more is true, pass offset 25, 50 and so on for the next page.

  • List schedules

    pagerduty-list-schedules

    List on-call schedules, by name, 25 per page, with their time zone, users and escalation policies. When more is true, pass offset 25, 50 and so on for the next page.

  • List users

    pagerduty-list-users

    List users in the account, 25 per page, to find the user id to reassign an incident to: name, email, role, time zone. When more is true, pass offset 25, 50 and so on for the next page.

  • List maintenance windows

    pagerduty-list-maintenance-windows

    List maintenance windows, 25 per page: start and end time, description and the services they cover. filter picks past, future, ongoing, open (ongoing or future) or all. When more is true, pass offset 25, 50 and so on for the next page.

How do users connect? Each one brings their own PagerDuty.

  1. 1.Call for the userYour server invokes the action for the signed-in user. Without a PagerDuty connection, the SDK throws EndUserNotConnectedError with a connect link.
  2. 2.The user pastes a keyThe link opens a form that shows where in PagerDuty's settings to create the key. The link lasts 10 minutes and works once.
  3. 3.Anlyon checks itThe key is checked with PagerDuty before it is kept, and bound to api.pagerduty.com. It is never shown back.
  4. 4.Your server confirmsYour server confirms the connection for the user who is signed in, and the call goes through.

How do I control what an AI agent does in PagerDuty? Suggested limits and approvals, for you to review.

Suggested limits

  • 20 incidents opened a day
  • 100 incidents acknowledged a day
  • 50 incidents resolved a day
  • 200 notes added a day
  • 50 incidents reassigned a day
  • 50 urgency changes a day
  • 50 incidents snoozed a day
  • 20 incidents merged a day
  • 5 maintenance windows created a day
  • 10 maintenance windows ended a day

Suggested approvals

  • A person approves resolving an incident
  • A person approves merging incidents
  • A person approves a maintenance window

What the key must allow

  • An API access key you create
  • Not read-only, because it opens and updates incidents

Good to know

  • Opening an incident pages a person. Keep the daily limit low.
  • A status read-back can match a change someone else made in the same moment.

For your own account

  1. 1.In PagerDuty, open Integrations, API Access Keys, and create a key. Leave Read-only unticked.
  2. 2.In Anlyon, open Actions, then Integrations, choose PagerDuty and paste the key.
  3. 3.Anlyon checks the key with PagerDuty before storing it. It becomes a secret named PAGERDUTY, bound to api.pagerduty.com.
  4. 4.Have a service id and the email of a PagerDuty user ready. Every write names the user it acts as.

How do I call PagerDuty from my agent's code? For one of your users, or for your own account.

Act for one of your users from your server, or connect your company's own PagerDuty with the CLI.

pagerduty.ts
import { Client, EndUserNotConnectedError } from "@anlyonhq/sdk";const anlyon = new Client({ apiKey: process.env.ANLYON_API_KEY! });try {  const { data } = await anlyon    .forUser(session.userId)    .actions.invoke("pagerduty-create-incident", {      from: "oncall@example.com",      service_id: "PWIXJZS",      title: "Checkout error rate above 5%"    });  return { status: "done", grade: data.grade };} catch (error) {  if (error instanceof EndUserNotConnectedError) {    // The user connects their own PagerDuty, then you call again.    return { status: "connect_required", url: error.connectUrl };  }  throw error;}

Questions. PagerDuty and AI agents.

Anything still unanswered is worth an email.

support@anlyon.com

Email us

Connect a PagerDuty account in Anlyon, switch on the operations the agent may use, and call them from the TypeScript or Python SDK or over MCP. Each of your users connects their own account through a connect link, where they paste a key they create in PagerDuty. Your agent sees the operations by name and never sees the credential.

Through Anlyon it can read incidents, on-call and services, and open and resolve incidents. Reads change nothing. Writes are off until you switch them on, and every write leaves a receipt.

Yes. Every PagerDuty action you enable is also an MCP tool on Anlyon's hosted MCP server, at https://api.anlyon.com/mcp. Add that address to Claude Code, Cursor or Codex and sign in. It is Anlyon's own integration, and it calls PagerDuty's API with the key Anlyon holds.

No. The key stays with Anlyon and is sent only in the request to PagerDuty's API. No API returns it, to you, to the console or to an agent.

Let your agent act for your users, safely.

A few lines of server code, then send a user a connect link. Nothing to host.

$ claude mcp add --transport http anlyon https://api.anlyon.com/mcp