Setup
Open Cursor Settings
Navigate to Cursor Settings > Tools > Add MCP, or use the keyboard shortcut:
- Mac:
Cmd+, - Windows/Linux:
Ctrl+,
Add MCP Server Configuration
Add the following configuration to your The
settings.json:--enable-write-tools flag enables write operations, allowing you to create incidents, schedule overrides, and more.Configure API Key
When you first use the MCP server, Cursor will prompt you to enter your PagerDuty API key. The
${input:pagerduty-api-key} variable ensures your key is stored securely.Configuration Details
Configuration File Location
The Cursor MCP configuration is stored in yoursettings.json file, which can be accessed through the Cursor settings interface.
Environment Variables
- PAGERDUTY_USER_API_KEY: Your PagerDuty User API Token. Use the
${input:pagerduty-api-key}variable for secure storage. - PAGERDUTY_API_HOST (optional): Set to
https://api.eu.pagerduty.comif your account is in the EU region.
Troubleshooting
Server Not Starting
If the MCP server doesn’t start:- Verify that
uvxis installed and available in your PATH - Check that your PagerDuty API key is valid
- Review the Cursor console for error messages
API Key Not Prompting
If Cursor doesn’t prompt for your API key:- Ensure you’re using the
${input:pagerduty-api-key}variable syntax - Try restarting Cursor
- Check the Cursor settings to see if the input was already configured
Connection Issues
If you’re experiencing connection issues:- Verify your PagerDuty API key has the necessary permissions
- If you’re in the EU region, add the
PAGERDUTY_API_HOSTenvironment variable: - Check your network connection and firewall settings
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 Cursor after making configuration changes