pagerduty-mcp-server

PagerDuty/pagerduty-mcp-server

3.5

If you are the rightful owner of pagerduty-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

PagerDuty MCP Server is a local Model Context Protocol server that allows users to manage their PagerDuty account directly from an MCP-enabled client.

Tools
5
Resources
0
Prompts
0

PagerDuty's official MCP Server

PagerDuty's local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account, allowing you to manage incidents, services, schedules, event orchestrations, and more directly from your MCP-enabled client.

Prerequisites

  • asdf-vm installed.

  • uv installed globally.

  • A PagerDuty User API Token. To obtain a PagerDuty User API Token, follow these steps:

    1. Navigate to User Settings. Click on your user profile icon, then select My Profile and then User Settings.
    2. In your user settings, locate the API Access section.
    3. Click the Create API User Token button and follow the prompts to generate a new token.
    4. Copy the generated token and store it securely. You will need this token to configure the MCP server.

    Use of the PagerDuty User API Token is subject to the PagerDuty Developer Agreement.

Using with MCP Clients

Cursor Integration

You can configure this MCP server directly within Cursor's settings.json file, by following these steps:

  1. Open Cursor settings (Cursor Settings > Tools > Add MCP, or Cmd+, on Mac, or Ctrl+, on Windows/Linux).

  2. Add the following configuration:

    {
      "mcpServers": {
        "pagerduty-mcp": {
          "type": "stdio",
          "command": "uvx",
          "args": [
            "pagerduty-mcp",
            "--enable-write-tools"
            // This flag enables write operations on the MCP Server enabling you to creating incidents, schedule overrides and much more
          ],
          "env": {
            "PAGERDUTY_USER_API_KEY": "${input:pagerduty-api-key}"
          }
        }
      }
    }
    

VS Code Integration

You can configure this MCP server directly within Visual Studio Code's settings.json file, allowing VS Code to manage the server lifecycle.

  1. Open VS Code settings (File > Preferences > Settings, or Cmd+, on Mac, or Ctrl+, on Windows/Linux).

  2. Search for "mcp" and ensure "Mcp: Enabled" is checked under Features > Chat.

  3. Click "Edit in settings.json" under "Mcp > Discovery: Servers".

  4. Add the following configuration:

    {
        "mcp": {
            "inputs": [
                {
                    "type": "promptString",
                    "id": "pagerduty-api-key",
                    "description": "PagerDuty API Key",
                    "password": true
                }
            ],
            "servers": {
                "pagerduty-mcp": { 
                    "type": "stdio",
                    "command": "uvx",
                    "args": [
                        "pagerduty-mcp",
                        "--enable-write-tools"
                        // This flag enables write operations on the MCP Server enabling you to creating incidents, schedule overrides and much more
                    ],
                    "env": {
                        "PAGERDUTY_USER_API_KEY": "${input:pagerduty-api-key}",
                        "PAGERDUTY_API_HOST": "https://api.pagerduty.com"
                        // If your PagerDuty account is located in EU update your API host to https://api.eu.pagerduty.com
                    }
                }
            }
        }
    }
    
Trying it in VS Code Chat (Agent)
  1. Ensure MCP is enabled in VS Code settings (Features > Chat > "Mcp: Enabled").
  2. Configure the server as described above.
  3. Open the Chat view in VS Code (View > Chat).
  4. Make sure Agent mode is selected. In the Chat view, you can enable or disable specific tools by clicking the 🛠️ icon.
  5. Enter a command such as Show me the latest incident or List my event orchestrations to interact with your PagerDuty account through the MCP server.
  6. You can start, stop, and manage your MCP servers using the command palette (Cmd+Shift+P/Ctrl+Shift+P) and searching for MCP: List Servers. Ensure the server is running before sending commands. You can also try to restart the server if you encounter any issues.

Claude Desktop Integration

You can configure this MCP server to work with Claude Desktop by adding it to Claude's configuration file.

  1. Locate your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Create or edit the configuration file and add the following configuration:

    {
      "mcpServers": {
        "pagerduty-mcp": {
          "command": "uvx",
          "args": [
            "pagerduty-mcp",
            "--enable-write-tools"
          ],
          "env": {
            "PAGERDUTY_USER_API_KEY": "your-pagerduty-api-key-here",
            "PAGERDUTY_API_HOST": "https://api.pagerduty.com"
          }
        }
      }
    }
    
  3. Replace the placeholder values:

    • Replace /path/to/your/mcp-server-directory with the full path to the directory where you cloned the MCP server (e.g., /Users/yourname/code/pagerduty-mcp)
    • Replace your-pagerduty-api-key-here with your actual PagerDuty User API Token
    • If your PagerDuty account is located in the EU, update the API host to https://api.eu.pagerduty.com
  4. Restart Claude Desktop completely for the changes to take effect.

  5. Test the integration by starting a conversation with Claude and asking something like "Show me my latest PagerDuty incidents" or "List my event orchestrations" to verify the MCP server is working.

    Security Note: Unlike VS Code's secure input prompts, Claude Desktop requires you to store your API key directly in the configuration file. Ensure this file has appropriate permissions (readable only by your user account) and consider the security implications of storing credentials in plain text.

Set up locally

  1. Clone the repository

  2. Install asdf plugins

    asdf plugin add python
    asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
    asdf plugin add uv
    
  3. Install tool versions using asdf:

    asdf install
    
  4. Create a virtual environment and install dependencies using uv (now that asdf has set the correct Python and uv versions):

    uv sync
    
  5. Ensure uv is available globally.

    The MCP server can be run from different places so you need uv to be available globally. To do so, follow the official documentation.

    Tip: You may need to restart your terminal and/or VS Code for the changes to take effect.

  6. Run it locally

    To run your cloned PagerDuty MCP Server you need to update your configuration to use uv instead of uvx.

    "pagerduty-mcp": { 
        "type": "stdio",
        "command": "uv",
        "args": [
            "run",
            "--directory",
            "/path/to/your/mcp-server-directory",
            // Replace with the full path to the directory where you cloned the MCP server, e.g. "/Users/yourname/code/mcp-server",     
            "python",
            "-m",
            "pagerduty_mcp",
            "--enable-write-tools"
            // This flag enables write operations on the MCP Server enabling you to creating incidents, schedule overrides and much more
        ],
        "env": {
            "PAGERDUTY_USER_API_KEY": "${input:pagerduty-api-key}",
            "PAGERDUTY_API_HOST": "https://api.pagerduty.com"
            // If your PagerDuty account is located in EU update your API host to https://api.eu.pagerduty.com
        }
    }
    

Available Tools and Resources

This section describes the tools provided by the PagerDuty MCP server. They are categorized based on whether they only read data or can modify data in your PagerDuty account.

Important: By default, the MCP server only exposes read-only tools. To enable tools that can modify your PagerDuty account (write-mode tools), you must explicitly start the server with the --enable-write-tools flag. This helps prevent accidental changes to your PagerDuty data.

ToolAreaDescriptionRead-only
create_alert_grouping_settingAlert GroupingCreates a new alert grouping setting
delete_alert_grouping_settingAlert GroupingDeletes an alert grouping setting
get_alert_grouping_settingAlert GroupingRetrieves a specific alert grouping setting
list_alert_grouping_settingsAlert GroupingLists alert grouping settings with filtering
update_alert_grouping_settingAlert GroupingUpdates an existing alert grouping setting
get_event_orchestrationEvent OrchestrationsRetrieves a specific event orchestration
get_event_orchestration_routerEvent OrchestrationsGets the router configuration for an event orchestration
list_event_orchestrationsEvent OrchestrationsLists event orchestrations with optional filtering
update_event_orchestration_routerEvent OrchestrationsUpdates the router configuration for an event orchestration
append_event_orchestration_router_ruleEvent OrchestrationsAdds a new routing rule to an event orchestration router
list_escalation_policiesEscalation PolicyLists escalation policies
get_escalation_policyEscalation PolicyRetrieves a specific escalation policy
add_note_to_incidentIncidentsAdds note to an incident
add_respondersIncidentsAdds responders to an incident
create_incidentIncidentsCreates a new incident
get_incidentIncidentsRetrieves a specific incident
list_incidentsIncidentsLists incidents
manage_incidentsIncidentsUpdates status, urgency, assignment, or escalation level
add_team_memberTeamsAdds a user to a team with a specific role
create_teamTeamsCreates a new team
delete_teamTeamsDeletes a team
get_teamTeamsRetrieves a specific team
list_team_membersTeamsLists members of a team
list_teamsTeamsLists teams
remove_team_memberTeamsRemoves a user from a team
update_teamTeamsUpdates an existing team
get_user_dataUsersGets the current user's data
list_usersUsersLists users in the PagerDuty account
list_oncallsOn-callLists on-call schedules
create_schedule_overrideSchedulesCreates an override for a schedule
get_scheduleSchedulesRetrieves a specific schedule
list_schedule_usersSchedulesLists users in a schedule
list_schedulesSchedulesLists schedules
create_serviceServicesCreates a new service
get_serviceServicesRetrieves a specific service
list_servicesServicesLists services
update_serviceServicesUpdates an existing service

Support

PagerDuty's MCP server is an open-source project, and as such, we offer only community-based support. If assistance is required, please open an issue in GitHub or PagerDuty's community forum.

Contributing

If you are interested in contributing to this project, please refer to our Contributing Guidelines.