Installation
- Go to Integrations in Dashboard
- Click Connect next to GitHub
- Choose repository either All repositories or Selected repositories
Using Agent in GitHub
The GitHub integration enables background agent workflows directly from pull requests and issues. You can trigger an agent to read context, implement fixes, and push commits by commenting@cursor [prompt]
on any PR or issue.
If you have Bugbot enabled, you can comment @cursor fix
to read the suggested fix from Bugbot to trigger a background agent to address the issue.
Permissions
The GitHub app requires specific permissions to work with background agents:Permission | Purpose |
---|---|
Repository access | Clone your code and create working branches |
Pull requests | Create PRs with agent changes for your review |
Issues | Track bugs and tasks that agents discover or fix |
Checks and statuses | Report on code quality and test results |
Actions and workflows | Monitor CI/CD pipelines and deployment status |
IP Allow List Configuration
If your organization uses GitHub’s IP allow list feature to restrict access to your repositories, you’ll need to contact support first to enable IP allowlist functionality for your team.Contact Support
Before configuring IP allowlists, contact hi@cursor.com to enable this feature for your team. This is required for both configuration methods below.Enable IP allow list configuration for installed GitHub Apps (Recommended)
The Cursor GitHub app has the IP list already pre-configured. You can enable the allowlist for installed apps to automatically inherit this list. This is the recommended approach, as it allows us to update the list and your organization receives updates automatically. To enable this:- Go to your organization’s Security settings
- Navigate to IP allow list settings
- Check “Allow access by GitHub Apps”
Add IPs directly to your allowlist
If your organization uses IdP-defined allowlists in GitHub or otherwise cannot use the pre-configured allowlist, you can manually add the IP addresses:The list of IP addresses may infrequently change. Teams using IP allow lists will be given advanced notice before IP addresses are added or removed.
Troubleshooting
Agent can't access repository
Agent can't access repository
- Install the GitHub app with repository access
- Check repository permissions for private repos
- Verify your GitHub account permissions
Permission denied for pull requests
Permission denied for pull requests
- Grant the app write access to pull requests
- Check branch protection rules
- Reinstall if the app installation expired
App not visible in GitHub settings
App not visible in GitHub settings
- Check if installed at organization level
- Reinstall from github.com/apps/cursor
- Contact support if installation is corrupted