---
name: iblai-connect-pagerduty
description: "Read and write PagerDuty data through the PagerDuty REST API and expose it to an ibl.ai agent as an MCP tool. Use when the user asks an agent to work with PagerDuty data, or to set up a PagerDuty MCP connection on ibl.ai."
metadata:
  kind: guide
---

# PagerDuty connector for AI agents

> A starting point maintained on ibl.ai at https://ibl.ai/developer/connectors/pagerduty — not part of the iblai/base repository. Checked against PagerDuty, Inc.'s documentation on October 20, 2026; test it against your own PagerDuty setup before you rely on it.

PagerDuty routes alerts to on-call responders and tracks incidents to resolution. An account holds incidents with notes and log entries, services, escalation policies, schedules and on-call assignments.

## Auth & conventions

- **API:** PagerDuty REST API (REST). JSON REST API for incidents (list, get, create, update, merge, snooze, notes), services, schedules, on-calls and log entries. GET /incidents pages up to 100 results.
- **Base URL:** https://api.pagerduty.com/
- **Access:** Issued by your administrator. Account API tokens are created by account administrators and can be read-only or full access. User API tokens need Advanced Permissions; apps can use OAuth scopes such as incidents.read.
- **Auth:** Account API token; User API token; OAuth (PagerDuty App, scoped). Send Authorization: Token token={token} exactly, over HTTPS; a malformed header returns 401. Account tokens see all account data; user tokens see what their user can.
- **Limits:** 960 requests per minute per account API key, per user across a user's keys, and per account or user for OAuth tokens. Over the limit returns 429 with ratelimit-limit, -remaining and -reset headers.
- Keep PagerDuty credentials in environment variables or the ibl.ai credential store. Never print a token in chat and never commit one to a file.
- Destructive or outward-facing calls are marked **Confirm with the user first** — do.

## Reads

- **Incidents** — GET /incidents (limit up to 100 per page); scope incidents.read.
- **Services** — Services and the integrations that open incidents on them.
- **On-calls and schedules** — Who is on call now and upcoming schedule layers.
- **Log entries** — The timeline of notifications, acknowledgements and escalations.

## Writes

- **Create an incident** — POST an incident on a service to page the on-call responder.
- **Add a note** — POST a note on an incident.
- **Update an incident** — PUT to acknowledge, reassign, escalate or resolve an incident. **Confirm with the user first.**
- **Merge or snooze incidents** — Merge incidents into one, or snooze one, which changes paging. **Confirm with the user first.**

## Expose it to an ibl.ai agent (MCP)

PagerDuty, Inc. publishes an official MCP server, PagerDuty MCP Server (hosted) (https://docs.pagerduty.com/ai-automation/advance/pagerduty-mcp-server). Register it below as-is, or host your own server that wraps the calls in this skill.

First install the ibl.ai platform skills and connect your organization (writes `IBLAI_ORG`, `IBLAI_USERNAME` and `IBLAI_API_KEY` to `.env`):

```bash
npx skills add iblai/base --all
# then, in your coding agent:
/iblai-api-login
```

Every call below sends `Authorization: Api-Token $IBLAI_API_KEY`.

1. **Register the server** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-servers/` with `name`, `url`, `transport` (`sse` | `websocket` | `streamable_http`) and `auth_type` (`none` | `token` | `oauth2`). Capture the returned `id`.
   - For an API key or service credential use `auth_type=token` with `auth_scope=platform` for one key across the organization, or scope it to a single agent for one key per agent.
2. **Create the connection** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-server-connections/` with `server`, `scope` (`platform` | `mentor` | `user`), `auth_type`, and either `credentials` + `authorization_scheme` or a `connected_service` id for OAuth. Credentials are masked on read; never send a masked value back.
3. **Enable it on the agent** — `GET https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mentors/{agent_id}/settings/`, add `mcp-tool` to `tool_slugs` and the server id to `mcp_servers`, then `PATCH` the full lists back. They are replaced, not merged.

Full reference: https://ibl.ai/developer/platform/mcp/mcp-connections and the `/iblai-api-agent-mcp` skill.

## Example prompts

- "Who is on call for the SOC escalation policy right now?"
- "Summarize triggered and acknowledged incidents from the last 12 hours"
- "Add a triage note to incident Q1ABC with the Splunk findings"
- "Draft a weekly report of security incidents by service and time to resolve"

## Guardrails

- Incident timelines and notes can describe security events and an organization's weaknesses. Prefer read-only or scoped tokens and confirm with a person before resolving incidents.
- Request the narrowest PagerDuty scopes or role the task needs, and prefer a read-only credential for agents that only answer questions.
- Return the fields the user asked for, not whole records; do not paste personal data into chat that the user did not request.
- Before any write, show the user exactly what will change and wait for a yes.
- Respect the documented limits above: page through results and back off on rate-limit responses instead of retrying in a loop.

## References

- PagerDuty API authentication: https://docs.pagerduty.com/developer/authentication
- REST API rate limits: https://docs.pagerduty.com/developer/rest-api-rate-limits
- PagerDuty MCP Server: https://docs.pagerduty.com/ai-automation/advance/pagerduty-mcp-server
- PagerDuty MCP Server (hosted): https://docs.pagerduty.com/ai-automation/advance/pagerduty-mcp-server
- This connector on ibl.ai: https://ibl.ai/developer/connectors/pagerduty
- ibl.ai MCP server connections: https://ibl.ai/developer/platform/mcp/mcp-connections
