Environment Variables
The PagerDuty MCP Server uses the following environment variables.
Requiredโ
| Variable | Description |
|---|---|
PAGERDUTY_USER_API_KEY | Your PagerDuty User API Token. See Authentication. |
Optionalโ
| Variable | Default | Description |
|---|---|---|
PAGERDUTY_API_HOST | https://api.pagerduty.com | PagerDuty 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