Authentication
The PagerDuty MCP Server authenticates using a PagerDuty User API Token.
Creating an API Tokenโ
- Log in to PagerDuty
- Click your avatar in the top-right โ My Profile
- Select the User Settings tab
- Scroll to API Access โ Create New API User Token
- Give the token a name (e.g.,
mcp-server) and click Create Token - Copy the token immediately โ it will not be shown again
Setting the Tokenโ
Environment Variable (Recommended)โ
Set PAGERDUTY_USER_API_KEY in your environment or MCP client configuration:
export PAGERDUTY_USER_API_KEY="your-token-here"
Per-Client Configurationโ
Most MCP clients allow setting environment variables in their config. See the Installation guides for client-specific examples.
EU Regionโ
If your PagerDuty account is on the EU region, also set:
export PAGERDUTY_API_HOST="https://api.eu.pagerduty.com"
Security Best Practicesโ
- Never hardcode tokens in configuration files committed to version control
- Use environment variable injection (e.g.,
$ENV_VARreferences in VS Code settings) - Rotate tokens periodically via PagerDuty's API Access settings
- Use the minimum required permissions for read-only workflows