The PagerDuty MCP Server provides a programmatic interface for LLMs to interact with PagerDuty's API functionality, enabling operations on incidents, services, teams, and users with structured inputs and outputs.
Before installing the PagerDuty MCP Server, you'll need:
cd pagerduty-mcp-server
brew install uv
uv sync
export PAGERDUTY_API_TOKEN=your_api_token_here
You can use the PagerDuty MCP Server either as a Goose extension or as a standalone server.
uv run /path/to/mcp/pagerduty-mcp-server/.venv/bin/pagerduty-mcp-server
To run the server independently:
uv run path/to/repo/pagerduty-mcp-server/.venv/bin/pagerduty-mcp-server
All API responses follow this consistent structure:
{
"metadata": {
"count": 5,
"description": "A short summary of the results"
},
"resources": [
{
"id": "example_id",
"name": "example_name",
"other_properties": "..."
}
],
"error": {
"message": "Human-readable error description",
"code": "MACHINE_READABLE_ERROR_CODE"
}
}
The error object will only be present if an error occurred during processing.
When errors occur, the response includes an error object:
{
"metadata": {
"count": 0,
"description": "Error occurred while processing request"
},
"error": {
"message": "Invalid user ID provided",
"code": "INVALID_USER_ID"
}
}
Common error scenarios include invalid resource IDs, missing parameters, invalid parameter values, API failures, and response processing errors.
None
or empty stringstriggered
, acknowledged
, and resolved
are validhigh
and low
are validlimit
parameter restricts the number of results returnedlimit
parameter controls the number of results returnedMany functions accept a current_user_context
parameter (defaults to True
), which filters results based on the current user. When this is enabled, certain filter parameters cannot be used:
user_ids
cannot be used with current_user_context=True
team_ids
and service_ids
cannot be used with current_user_context=True
team_ids
cannot be used with current_user_context=True
team_ids
cannot be used with current_user_context=True
user_ids
cannot be used with current_user_context=True
This feature is useful for queries like "who is currently on-call for my team?"
The PagerDuty MCP Server can be used to answer queries such as:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "pagerduty-mcp-server" '{"command":"uv","args":["run","pagerduty-mcp-server"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"pagerduty-mcp-server": {
"command": "uv",
"args": [
"run",
"pagerduty-mcp-server"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"pagerduty-mcp-server": {
"command": "uv",
"args": [
"run",
"pagerduty-mcp-server"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect