Setup
Locate Configuration File
Find your Claude Desktop configuration file based on your operating system:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Edit Configuration File
Open the configuration file in a text editor and add the following configuration:The
--enable-write-tools flag enables write operations, allowing you to create incidents, schedule overrides, and more.Replace Placeholder Values
Update the configuration with your actual values:
- Replace
your-pagerduty-api-key-herewith your actual PagerDuty User API Token - If your PagerDuty account is located in the EU, update
PAGERDUTY_API_HOSTtohttps://api.eu.pagerduty.com
Configuration Details
Configuration File Locations
macOS
Cmd+Shift+G) and paste the path.
Windows
%APPDATA%\Claude in the Windows Explorer address bar.
Complete Configuration Example
Environment Variables
- PAGERDUTY_USER_API_KEY: Your PagerDuty User API Token. This must be stored directly in the configuration file.
- PAGERDUTY_API_HOST: The PagerDuty API endpoint. Use
https://api.pagerduty.comfor US accounts orhttps://api.eu.pagerduty.comfor EU accounts.
Security Considerations
To protect your API key:-
Set proper file permissions to ensure the configuration file is readable only by your user account:
- macOS/Linux:
chmod 600 ~/Library/Application\ Support/Claude/claude_desktop_config.json - Windows: Right-click the file > Properties > Security > Edit > Remove unnecessary users
- macOS/Linux:
- Never commit the configuration file to version control systems like Git
- Use a dedicated API key for Claude Desktop integration with appropriate scoped permissions
- Regularly rotate your API keys as part of your security practices
- Consider the security implications of storing credentials in plain text on your system
Testing the Integration
To verify the MCP server is working correctly:- Restart Claude Desktop completely
- Start a new conversation
- Ask Claude: “Show me my latest PagerDuty incidents”
- Verify that Claude responds with your incident data
Troubleshooting
Server Not Starting
If the MCP server doesn’t start:- Verify that
uvxis installed and available in your system PATH - Check that the configuration file is valid JSON (use a JSON validator)
- Ensure there are no syntax errors in the configuration
- Try running
uvx pagerduty-mcp --enable-write-toolsmanually in your terminal to check for errors
Configuration File Not Found
If Claude Desktop doesn’t recognize the configuration:- Verify the file path is correct for your operating system
- Ensure the directory exists (create it if necessary)
- Check the file name is exactly
claude_desktop_config.json - Make sure there are no hidden file extensions (like
.txt)
API Authentication Errors
If you’re seeing authentication errors:- Verify your PagerDuty API key is correct
- Check that the API key has the necessary permissions in PagerDuty
- Ensure there are no extra spaces or quotes around the API key in the configuration
- Try generating a new API key from PagerDuty and updating the configuration
Connection Issues for EU Accounts
If you’re in the EU region and experiencing connection issues:- Update
PAGERDUTY_API_HOSTtohttps://api.eu.pagerduty.com - Save the configuration file
- Completely restart Claude Desktop
Write Operations Not Working
If you can read data but not create or modify resources:- Ensure the
--enable-write-toolsflag is included in theargsarray - Verify your API key has write permissions in PagerDuty
- Restart Claude Desktop after making configuration changes
Changes Not Taking Effect
If your configuration changes aren’t being applied:- Ensure you completely quit Claude Desktop (not just close the window)
- On macOS, use
Cmd+Qto fully quit the application - On Windows, check the system tray to ensure Claude is not still running
- Wait a few seconds before restarting
- Check the configuration file was saved correctly