# PagerDuty MCP Server

Connect AI tools to PagerDuty with MCP to securely manage incidents, services and on-call schedules

The PagerDuty Model Context Protocol (MCP) Server is an open standard that enables AI assistants (like Claude Desktop, Cursor, or VS Code) to interact securely with your PagerDuty account. This integration allows AI tools to retrieve incident data, manage services, and update on-call schedules on your behalf.

## Integration Options

You can connect your Agents to PagerDuty using the PagerDuty-hosted MCP server, a managed service with the latest features at `https://mcp.pagerduty.com/mcp`. No setup, nothing to install.

> **Local MCP Server Deprecation Notice:** The self-hosted MCP server is now deprecated and its GitHub repo is archived and read-only.
>
> Use the PagerDuty-hosted MCP server to get the latest features.

## Requirements

Before setting up either MCP option, ensure you have:

- **PagerDuty Account Access**: A valid PagerDuty account with [Advanced Permissions](/account-admin/advanced-permissions).
- **API Key**: [A PagerDuty User API key](/account-admin/api-access-keys#generate-a-user-token-rest-api-key), or an [OAuth client](/developer/oauth-functionality) if you are using the PagerDuty-hosted server.
- **MCP Client**: An MCP-compatible AI assistant or application (e.g., Claude Desktop, VS Code, Cursor). For the PagerDuty-hosted server, the client must support remote (HTTP-based) MCP servers.

## PagerDuty-hosted MCP Server

The PagerDuty-hosted MCP server lets you connect your AI assistant to PagerDuty without installing anything locally. It supports both OAuth and API keys for authentication, which makes it straightforward to roll out across teams and enterprise environments.

Unlike self-hosted servers, which run as a subprocess on your machine, the PagerDuty-hosted server:

- Is hosted and maintained by PagerDuty
- Exposes tools via a remote HTTP endpoint
- Requires no local Python installation or `uvx`

### Step 1: Choose an Authorization Method

Both user-level and account-level credentials are supported. Note that some tools and filters require user-level authentication — for example, scoping `list_incidents` by `teams` or `assigned`.

**To authorize with an API Key**, provide a custom header:

```shell
Authorization: Token token=<your-api-key-here>
```

**To authorize with OAuth**, you have two options:

- Provide static client credentials for [OAuth metadata discovery](https://modelcontextprotocol.io/specification/draft/basic/authorization#authorization-server-discovery).
- Provide a token directly via a custom header: `Authorization: Bearer <your-bearer-token-here>`. For example, to use an [App OAuth Token](/developer/private-apps#app-tokens) obtained via the `client-credentials` grant.

For more on creating OAuth clients for your PagerDuty account, see [OAuth Functionality](/developer/oauth-functionality) on the PagerDuty Developer Portal.

> **Dynamic Client Registration:** PagerDuty does not currently support Dynamic Client Registration (DCR).

### Step 2: Configure Your MCP Client

> **EU Service Region Accounts:** PagerDuty-hosted configurations on EU accounts should use: `<https://mcp.eu.pagerduty.com/mcp>`

#### Cursor

Add the following to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (current project only):

```json
{
  "mcpServers": {
    "pagerduty": {
      "url": "https://mcp.pagerduty.com/mcp"
    }
  }
}
```

#### Visual Studio Code

Add the following to your `settings.json`.

**With OAuth** — Visual Studio Code prompts you for the OAuth client credentials when the server starts, and provides the redirect URIs you need:

```json
{
  "mcp": {
    "servers": {
      "pagerduty": {
        "type": "http",
        "url": "https://mcp.pagerduty.com/mcp"
      }
    }
  }
}
```

**With an API key** — Visual Studio Code prompts you for the key on first use and stores it securely:

```json
{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "pagerduty-api-key",
        "description": "PagerDuty API Key",
        "password": true
      }
    ],
    "servers": {
      "pagerduty": {
        "type": "http",
        "url": "https://mcp.pagerduty.com/mcp",
        "headers": {
          "Authorization": "Token token=${input:pagerduty-api-key}"
        }
      }
    }
  }
}
```

#### Claude Code

**With OAuth**, you need to use a static port in the redirect URL — for example `http://localhost:8080/callback` — and then provide that port during configuration:

```bash
MCP_CLIENT_SECRET=YOUR_CLIENT_SECRET claude mcp add-json pagerduty '{"type":"http","url":"https://mcp.pagerduty.com/mcp","oauth":{"clientId":"YOUR_CLIENT_ID","callbackPort":8080}}' --client-secret
```

**With an API key:**

```bash
PAGERDUTY_API_KEY=YOUR_API_KEY claude mcp add-json pagerduty '{"type":"http","url":"https://mcp.pagerduty.com/mcp","headers":{"Authorization":"Token token=${PAGERDUTY_API_KEY}"}}'
```

### Tools Available

| Tool | Actions |
| --- | --- |
| `browse_incidents` | list, get, list_alerts, get_alert, list_notes, context (related\|past\|outlier), list_change_events, list_workflows, get_workflow |
| `manage_incidents` | create, update, add_note, add_responders, start_workflow |
| `browse_services` | list, get |
| `manage_services` | create, update |
| `browse_schedules` | list, get, list_users, list_oncalls |
| `manage_schedules` | create, update, create_override |
| `browse_teams` | list, get, list_members |
| `manage_teams` | create, update, delete, add_member, remove_member |
| `browse_event_orchestrations` | list, get, get_router, get_service, get_global |
| `manage_event_orchestrations` | update_router, append_router_rule |
| `browse_alert_grouping` | list, get |
| `manage_alert_grouping` | create, update, delete |
| `browse_status_pages` | list, list_severities, list_impacts, list_statuses, get_post, list_post_updates |
| `manage_status_pages` | create_post, create_post_update |
| `browse_escalation_policies` | list, get |
| `browse_users` | list, get |
| `browse_change_events` | list, get, list_service |
| `browse_activity` | list_log_entries, get_log_entry |

### Limitations

- **Tool filtering** is not directly available for the PagerDuty-hosted server at this point in time. You can, however, limit which tools succeed by using a [Scoped OAuth client](/developer/oauth-functionality#scoped-oauth).

### Troubleshooting

If you cannot connect to the PagerDuty-hosted server:

1. Verify that your authorization is still valid, and re-generate it if not. See [Authentication](/developer/authentication) for more details.
2. Check that your MCP client supports remote (HTTP-based) MCP connections.
3. Consult the [PagerDuty MCP API Reference](/developer/api/reference/mcp/pagerduty-mcp-api/mcp-root) for the latest endpoint URLs and requirements.

## API Reference

Explore the PagerDuty MCP API specification on the [PagerDuty MCP API Reference](/developer/api/reference/mcp/pagerduty-mcp-api/mcp-root).
