Skip to main content

Authentication

The PagerDuty MCP Server authenticates using a PagerDuty User API Token.

Creating an API Tokenโ€‹

  1. Log in to PagerDuty
  2. Click your avatar in the top-right โ†’ My Profile
  3. Select the User Settings tab
  4. Scroll to API Access โ†’ Create New API User Token
  5. Give the token a name (e.g., mcp-server) and click Create Token
  6. Copy the token immediately โ€” it will not be shown again

Setting the Tokenโ€‹

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_VAR references in VS Code settings)
  • Rotate tokens periodically via PagerDuty's API Access settings
  • Use the minimum required permissions for read-only workflows