Connect PagerDuty to Claude Code
Triage incidents, acknowledge and resolve pages, and see who is on call. Add Toolspoke to Claude Code once and it can use 12 PagerDuty actions. Your PagerDuty credential stays in Toolspoke, and you choose which actions Claude Code may call.
Set it up in Claude Code
Three steps, the first one once for every toolkit you will ever add.
Add Toolspoke to Claude Code
Run it in your project, then /mcp to sign in
claude mcp add --transport http toolspoke https://toolspoke.com/mcpThe sign-in opens in your browser, and Toolspoke asks you to approve it.
Install PagerDuty and connect it
Add PagerDuty to a project in your Toolspoke workspace.
API key. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.
- REST API key
- PagerDuty → Integrations → API Access Keys → Create New API Key. A read-only key covers every read action here; the writes need a full-access key.
Choose what Claude Code may do
All 12 actions start on. Switch off any of the 3 actions that change something in PagerDuty, and Claude Code gets a refusal if it tries.
What you can ask Claude Code for
A few of the PagerDuty actions that only read, so they are safe to try first.
- List incidents, newest first by default
- List the services incidents are attached to, with their escalation policies and current status
- List escalation policies with their rules and the schedules or users at each level
- Answer "who is on call right now"
What Claude Code can do in PagerDuty
9 actions read, one writes and 2 delete or permanently change something.
Reads
List incidents
List incidents, newest first by default. Start here when triaging: pass statuses ["triggered","acknowledged"] to see only what is still open, and service_ids to narrow to one service. Returns the incident ids that get_incident, update_incident_status, add_incident_note and list_incident_log_entries all need.
Get incident
Fetch one incident in full: current status, who it is assigned to, its service, escalation policy, priority and the alert body it was created from. Call list_incidents first for the id. For the sequence of what happened, acknowledgements, escalations, notifications, call list_incident_log_entries instead.
List incident log entries
Return the timeline of one incident: when it triggered, every acknowledgement, escalation, reassignment, notification and status change, in order. Use this to answer "why was nobody paged" or "how long did it sit unacknowledged", which get_incident cannot tell you.
List services
List the services incidents are attached to, with their escalation policies and current status. Call this to turn a service name into the service id that list_incidents filters on and create_incident requires.
List escalation policies
List escalation policies with their rules and the schedules or users at each level. Use it to work out who an unacknowledged incident on a service will reach next, and how long each level waits.
List oncalls
Answer "who is on call right now". Returns one entry per escalation level currently covered, naming the user, the schedule they are covering and the window. Filter by escalation_policy_ids to ask about one service's rota; pass since and until to ask about a future window instead of now.
List users
List PagerDuty users with their names, emails, roles and teams. Use it to turn a person's name into the user id that list_incidents and list_oncalls filter on, and to check that an address is a real PagerDuty login before it is used as the acting user.
Get user
Fetch one user by id, with their contact methods, notification rules and teams. Call list_users first for the id. Use it to check how someone would actually be reached before deciding an escalation failed.
List priorities
List the priority levels this account defines, most severe first, with the ids create_incident needs. Only accounts on Standard or Enterprise plans have priorities at all, an error here means the feature is not enabled, not that the key is wrong.
Writes
Add incident note
Append a note to an incident's timeline, which is how findings are handed to the next responder. The note is attributed to the connection's acting user, so the From email must be configured. Notes cannot be edited or removed afterwards.
Deletes or permanently changes
Create incident
Declare a new incident on a service, which pages whoever that service's escalation policy puts on call. Get the service id from list_services and, if the account has them, a priority id from list_priorities. Use urgency low for something that should wait for working hours. Requires the From email to be configured, because PagerDuty attributes the incident to a real user.
Update incident status
Acknowledge or resolve an incident. Acknowledging stops the escalation clock and tells the rota somebody has it; resolving closes it and stops all notification. Both change what the people on call see, and resolving an incident whose cause is still live means the next occurrence raises a fresh page. Requires the From email to be configured.
PagerDuty in Claude Code: questions
Does Claude Code see my PagerDuty credential?
No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.
Can I stop Claude Code from changing things in PagerDuty?
Yes. Each of the 12 actions can be switched off for a project. Turn off the 3 that change something and Claude Code can only read.
Will 12 actions crowd Claude Code's context?
No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the PagerDuty action it needs when it needs it. Adding more toolkits does not add more tools to its list.
Can I add it once for every project?
Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.
What does it cost?
Tool calls are free on every plan, and a PagerDuty call does not run in a sandbox, so it bills nothing.
PagerDuty in your other apps
Try PagerDuty in Claude Code
Free to start, and tool calls cost nothing on any plan.