Skip to main content

Environment Variables

The PagerDuty MCP Server uses the following environment variables.

Requiredโ€‹

VariableDescription
PAGERDUTY_USER_API_KEYYour PagerDuty User API Token. See Authentication.

Optionalโ€‹

VariableDefaultDescription
PAGERDUTY_API_HOSThttps://api.pagerduty.comPagerDuty API endpoint. Set to https://api.eu.pagerduty.com for EU accounts.

Setting Variablesโ€‹

Shellโ€‹

export PAGERDUTY_USER_API_KEY="your-token"
export PAGERDUTY_API_HOST="https://api.eu.pagerduty.com" # EU only

MCP Client Configโ€‹

Most clients accept an env block in their MCP server configuration:

{
"mcpServers": {
"pagerduty": {
"command": "uvx",
"args": ["pagerduty-mcp"],
"env": {
"PAGERDUTY_USER_API_KEY": "your-token",
"PAGERDUTY_API_HOST": "https://api.eu.pagerduty.com"
}
}
}
}

Dockerโ€‹

Pass variables with -e flags:

docker run --rm -i \
-e PAGERDUTY_USER_API_KEY="your-token" \
-e PAGERDUTY_API_HOST="https://api.eu.pagerduty.com" \
ghcr.io/pagerduty/pagerduty-mcp:latest