连接器指南阅读约 5 分钟26 个 MCP 工具7 种语言

如何通过 MCP 将 PagerDuty 连接到 Cursor

让你的 AI 使用 PagerDuty:查看未解决的事件及其时间线、告警和备注,了解谁在值班,读取服务、升级策略、排班和团队,经你同意后确认、解决、重新分配或升级事件,并获取事件分析数据。

HC作者:HelpCode 团队更新于 5 分钟阅读 在 GitHub 开源

无需信用卡 · 7 天试用 · 提供自托管方案

PagerDuty

PagerDuty

Let your AI work with PagerDuty: see open incidents with their timeline, alerts and notes, find out who is on call, read services, escalation policies, schedules and teams, acknowledge, resolve, reassign or escalate incidents after confirming with you, and pull incident analytics.

个工具

26

区域

INTL

类别

监控

身份验证

API Key

所需环境变量

PAGERDUTY_API_KEYPAGERDUTY_API_HOST
在 Cloud 上一键安装

7 天免费试用 · 无需信用卡

  • 7 天免费试用
    无需信用卡
  • 符合 GDPR,SOC 2 就绪
    数据驻留欧盟,审计日志
  • 在 GitHub 开源
    开源 · AGPL-3.0
  • 支持 ChatGPT、Claude、Gemini
    任何兼容 MCP 的客户端

跳过安装。2 分钟内即可运行。

在 cloud.anythingmcp.com 开始免费试用,一键添加 PagerDuty,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。

开始免费试用

摘要

让你的 AI 使用 PagerDuty:查看未解决的事件及其时间线、告警和备注,了解谁在值班,读取服务、升级策略、排班和团队,经你同意后确认、解决、重新分配或升级事件,并获取事件分析数据。

试试这样问

PagerDuty 的示例提示

点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。

PagerDuty · 通过 MCP 实时
分享
Opus 4.7

Claude 是 AI,可能会出错。请核对回答。

💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → PagerDuty、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无 git clone、无本地服务器。

PagerDuty + Cursor

让你的 AI 使用 PagerDuty:查看未解决的事件及其时间线、告警和备注,了解谁在值班,读取服务、升级策略、排班和团队,经你同意后确认、解决、重新分配或升级事件,并获取事件分析数据。

前提条件

完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:

PAGERDUTY_API_KEY, PAGERDUTY_API_HOST

步骤 1 — 获取凭证

  1. 登录 PagerDuty 并选择密钥类型。用户令牌(user token)以你本人身份操作,能看到你能看到的内容:点开头像,进入 My Profile → User Settings → Create API User Token。通用访问密钥(general access key)代表整个账户,需要管理员创建:Integrations → API Access Keys → Create New API Key。如果连接器只需读取,请在那里勾选 Read-only。
  2. 只把密钥本身粘贴到 PAGERDUTY_API_KEY,前面不要加 Token token=。
  3. 把 PAGERDUTY_API_HOST 设为 api.pagerduty.com(美国服务区域)或 api.eu.pagerduty.com(欧盟服务区域);你的区域显示在 Account Settings 中。密钥只能在其所属区域的主机上使用。
  4. 可选:使用通用访问密钥时,把 PAGERDUTY_FROM_EMAIL 设为某个 PagerDuty 用户的邮箱。每次修改 PagerDuty 都需要它,并把修改记录在该用户名下。使用用户令牌时留空即可。
  5. 用 pagerduty_list_services 检查设置。pagerduty_get_current_user 只适用于用户令牌;使用通用访问密钥时 PagerDuty 会返回 400,因为该密钥不属于任何用户。

谁能看到什么:用户令牌只能查看和修改其所有者在 PagerDuty 中有权操作的内容。通用访问密钥覆盖整个账户;只读密钥无法修改任何内容。请只把 MCP 服务器分享给有权处理你们事件的人。

修改会呼叫他人并关闭事件,所以 AI 会先问你:执行以下操作前,AI 会给你看事件(编号和标题)以及要做的修改,并等你同意。pagerduty_acknowledge_incident 会停止呼叫,但事件仍保持打开。pagerduty_resolve_incident 会关闭事件。pagerduty_reassign_incident 会呼叫新用户并移除当前负责人。pagerduty_escalate_incident 会呼叫你所选级别的值班人员。pagerduty_update_incident 修改标题、紧急程度或优先级(按名称,例如 P1);更改紧急程度可能会改变呼叫谁以及如何呼叫。pagerduty_add_incident_note 添加一条事件相关人员都能看到的备注,之后无法编辑。pagerduty_create_incident 在某个服务上创建事件,并立即呼叫该服务的值班人员。安装时没有工具被关闭,也没有任何工具会删除内容;如需只读使用,请使用只读的通用访问密钥,或关闭这些工具。

使用方法:用 pagerduty_list_incidents 按 triggered 和 acknowledged 状态筛选出未解决的事件;然后用 pagerduty_get_incident、pagerduty_list_incident_log_entries(时间线)、pagerduty_list_incident_alerts(监控工具发送的内容)和 pagerduty_list_incident_notes。当前谁在值班:pagerduty_list_oncalls。排班的班次:先 pagerduty_list_schedules,再 pagerduty_get_schedule。升级级别:pagerduty_list_escalation_policies 和 pagerduty_get_escalation_policy。目录信息:pagerduty_list_services、pagerduty_get_service、pagerduty_list_users(重新分配所需的用户 ID)、pagerduty_get_user、pagerduty_list_teams 和 pagerduty_list_priorities。

ID 和日期:ID 是类似 PT4KHLK 的短字符串;事件编号(#1234)不是 ID。日期使用 ISO 8601 格式。除非指定开始和结束时间(间隔最多 6 个月)或要求查询全部事件,pagerduty_list_incidents 只覆盖最近 30 天。

分析:pagerduty_get_incident_analytics(按事件:确认和解决所用时间、升级、打扰次数)和 pagerduty_get_incident_metrics(整个时段或按天、周、月汇总)需要包含 Analytics 的 PagerDuty 套餐。使用用户令牌时必须按 service_ids 或 team_ids 筛选。数据比实时延迟几个小时。

常见错误:401:密钥错误、已删除,或属于另一个区域的主机。与 From 请求头相关的 400:通用访问密钥在未设置 PAGERDUTY_FROM_EMAIL 的情况下做了修改,或该邮箱不是账户中的用户。pagerduty_get_current_user 返回 400:该密钥是通用访问密钥。403:只读密钥尝试修改、用户角色不允许,或套餐不含该功能(团队、分析)。404:此账户中没有该 ID。429:请求过多;请稍候重试。

该连接器不涉及 Events API(用集成的 routing key 发送告警)、创建或修改服务、排班、升级策略和用户、状态页、事件工作流、Webhook,以及任何删除操作。

步骤 2 — 安装 adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

步骤 3 — 在 Cursor 中添加连接器

你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(https://cloud.anythingmcp.com/mcp/…)。本指南中出现 YOUR_SERVER_ID 的地方都用它替换。

Cursor 从 ~/.cursor/mcp.json 读取 MCP 服务器。添加以下条目:

{
  "mcpServers": {
    "anythingmcp": {
      "url": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换 YOUR_MCP_API_KEY。
  2. 保存文件并重启 Cursor。
  3. 打开 Cursor → Settings → MCP,确认 anythingmcp 已列出并处于已连接状态。
  4. 开始对话,智能体现在可以调用 PagerDuty 的工具。

可用工具

ToolWhat it does
pagerduty_get_current_userRead the PagerDuty user behind the API key: id, name, email, role, time zone and teams
pagerduty_list_incidentsList incidents, newest first by default: id, number, title, status, urgency, priority, service, escalation policy, who it is assigned to…
pagerduty_get_incidentRead one incident: number, title, status, urgency, priority, service, escalation policy, assignees, acknowledgements, teams, alert counts…
pagerduty_list_incident_notesList the notes on an incident, oldest first: id, text, who wrote it and when
pagerduty_list_incident_log_entriesRead the timeline of an incident: triggers, notifications, acknowledgements, escalations, reassignments, notes and resolution, each with…
pagerduty_list_incident_alertsList the alerts grouped into an incident: id, summary, status, severity, alert key, service, created time and the event details the…
pagerduty_acknowledge_incidentAcknowledge an incident: it stops escalating and the responders are no longer paged for it, but it stays open
pagerduty_resolve_incidentResolve an incident: it is closed, its alerts are resolved and nobody is paged for it any more
pagerduty_reassign_incidentReassign an incident to one user: PagerDuty pages that user and removes the current assignees
pagerduty_escalate_incidentEscalate an incident to a level of its escalation policy: PagerDuty pages the on-call responders of that level
pagerduty_update_incidentChange an incident's title, urgency or priority
pagerduty_add_incident_noteAdd a note to an incident's timeline
pagerduty_create_incidentOpen a new incident on a service: PagerDuty pages the on-call responders of the service's escalation policy right away
pagerduty_list_servicesList services (the things PagerDuty raises incidents for): id, name, description, status (active, warning, critical, maintenance…
pagerduty_get_serviceRead one service: name, description, status, escalation policy, teams, urgency rule, acknowledgement and auto-resolve timeouts, alert…
pagerduty_list_escalation_policiesList escalation policies: id, name, description, how many times they repeat, the levels with their delay and targets (users or schedules)…
pagerduty_get_escalation_policyRead one escalation policy: levels in order with their delay in minutes and targets (users and schedules), repeat count, services and teams
pagerduty_list_oncallsWho is on call: one entry per user, escalation policy and level, with the schedule behind it and the shift start and end
pagerduty_list_schedulesList on-call schedules: id, name, description, time zone, the users in them and the escalation policies that use them
pagerduty_get_scheduleRead one schedule with its final rotation for a time window: who is on call from when to when, after overrides
pagerduty_list_usersList users: id, name, email, role, job title, time zone and teams
pagerduty_get_userRead one user: name, email, role, job title, time zone, teams and the type of each contact method (email, phone, push) without the addresses
pagerduty_list_teamsList teams: id, name and description
pagerduty_list_prioritiesList the incident priorities of the account in order (for example P1 to P5): id, name and description
pagerduty_get_incident_analyticsAnalytics per incident: seconds to first acknowledgement, to engage, to mobilise and to resolve, escalations, reassignments, interruptions…
pagerduty_get_incident_metricsAggregated incident metrics for a period: incident count, mean and percentile times to acknowledge and resolve, escalations, interruptions…

示例提示

  • “现在有哪些 PagerDuty 事件还没解决?按紧急程度排序,并列出每个事件的负责人。”
  • “Checkout API 现在是谁在值班?按升级策略下一个是谁?”
  • “确认事件 #4821,并添加一条备注,说明我正在排查数据库故障切换。先把这两项给我看,修改之前问我。”
  • “把支付网关那个未解决的事件重新分配给王芳。执行前告诉我是哪个事件和哪个人。”
  • “Platform 团队上个月每周的平均确认时间和平均解决时间是怎么变化的?”

FAQ

Cursor 免费套餐支持自定义 MCP 服务器吗? 支持,Hobby、Pro 和 Business 套餐均可使用 MCP。

下一步

这份指南对你有帮助吗?

你的 PagerDuty 智能体只差一次点击。

安装连接器,粘贴密钥,向 Cursor 提问。免费试用 7 天,无需信用卡。

相关指南

连接器

如何通过 MCP 将 PagerDuty 连接到 ChatGPT

让你的 AI 使用 PagerDuty:查看未解决的事件及其时间线、告警和备注,了解谁在值班,读取服务、升级策略、排班和团队,经你同意后确认、解决、重新分配或升级事件,并获取事件分析数据。

连接器

如何通过 MCP 将 PagerDuty 连接到 Claude

让你的 AI 使用 PagerDuty:查看未解决的事件及其时间线、告警和备注,了解谁在值班,读取服务、升级策略、排班和团队,经你同意后确认、解决、重新分配或升级事件,并获取事件分析数据。

连接器

如何通过 MCP 将 PagerDuty 连接到 Gemini

让你的 AI 使用 PagerDuty:查看未解决的事件及其时间线、告警和备注,了解谁在值班,读取服务、升级策略、排班和团队,经你同意后确认、解决、重新分配或升级事件,并获取事件分析数据。

连接器

如何通过 MCP 将 PagerDuty 连接到 Meta Muse

让你的 AI 使用 PagerDuty:查看未解决的事件及其时间线、告警和备注,了解谁在值班,读取服务、升级策略、排班和团队,经你同意后确认、解决、重新分配或升级事件,并获取事件分析数据。

连接器

PagerDuty 接入 MCP:在任意 AI 代理中处理事件和值班

让你的 AI 使用 PagerDuty:查看未解决的事件及其时间线、告警和备注,了解谁在值班,读取服务、升级策略、排班和团队,经你同意后确认、解决、重新分配或升级事件,并获取事件分析数据。

连接器

如何通过 MCP 将 Avito 连接到 Cursor

让你的 AI 使用你的 Avito 企业账户:列出广告并修改价格,读取浏览、联系和来电统计,检查自动上传 (autoload) 的上传记录及其错误、Feed 格式和钱包,并读取 Avito Messenger 聊天。发送消息和修改自动上传设置为可选功能,默认关闭。