The GitLab integration connects your repositories so you can use features like Cloud Agents and Bugbot.
Setup¶
GitLab.com¶
Requires Cursor admin access and GitLab maintainer access.
GitLab integration requires a paid GitLab plan (Premium or Ultimate). Project access tokens, which are required for this integration, are not available on GitLab Free.
- Go to Integrations in the dashboard
- Click Connect next to GitLab (or Manage Connections if already connected)
- Follow the GitLab installation flow
- Back on the Integrations tab, click Manage next to your GitLab connection and select Sync Repos
- Return to the dashboard to configure features on your repositories
To disconnect your GitLab account, return to the integrations dashboard and click Disconnect Account.
GitLab Self-Hosted¶
GitLab integration requires a paid GitLab plan (Premium or Ultimate). Project access tokens, which are required for this integration, are not available on GitLab Free.
GitLab Self-Hosted requires a Teams or Enterprise plan.
Networking¶
- GitLab self-hosted requires secure inbound access from Cursor and outbound access for webhook notifications.
- You need admin privileges on your GitLab instance to create the application.
IP whitelisting (recommended)¶
Add these IP addresses to your allowlist:
184.73.225.134
3.209.66.12
52.44.113.131
For other connection options beyond IP whitelisting, see Advanced networking.
Create GitLab application¶
- In your GitLab instance, create a new application (Instance level preferred)
- Set the redirect URI to
https://cursor.com/gitlab-connected - Configure the application:
- Trusted:true
- Confidential:true
- Scopes:apiandwrite_repository - After creation, you’ll receive an Application ID and Secret
Register with Cursor¶
- Go to Integrations in the dashboard → Advanced → GitLab Self-Hosted
- Enter your GitLab instance hostname
- Paste the Application ID and Secret
- Click Register
- Select your GitLab instance from the dropdown
- Click Connect to complete the installation
- Back on the Integrations tab, click Manage next to your GitLab connection and select Sync Repos
- Return to the dashboard to configure features on your repositories
Advanced networking¶
Self-hosted instances support multiple connection methods beyond IP whitelisting.
AWS PrivateLink or Cloudflare Tunnel¶
Available for Enterprise customers. Allow Cursor to access your instance over a private network connection. See Private Connectivity or contact your Cursor representative for setup.
Best for: Instances behind a firewall on a private network, including AWS-hosted instances and environments that can run cloudflared
Security: HTTPS encryption, AWS PrivateLink, Cloudflare Tunnel, VPC allowlisting, service account access tokens
Drawbacks: Requires coordination with Cursor. Google Private Service Connect is not currently supported.
Reverse Proxy Tunnel¶
Available for Enterprise customers. Run a reverse proxy tunnel on-premises that establishes a long-lived websocket connection to Cursor’s servers. Network requests are forwarded through to your instance. Requires no inbound network access. Contact your Cursor representative for setup.
Best for: Environments without inbound network access
Security: HTTPS encryption, service account access tokens
Drawbacks: Introduces additional complexity, maintenance requirements, and potential security considerations compared to more direct connection methods
Protected Git Scopes¶
Lock your GitLab group or namespace to your Cursor organization so only your teams can use its repositories with Cloud Agents, automations, and Bugbot. Protecting a scope requires the GitLab Owner role. See Protected Git Scopes.
Next steps¶
Once your GitLab integration is connected, configure the features that use it:
- Bugbot — automated PR reviews that catch bugs and security issues
- Cloud Agents — AI agents that run in the cloud on your repositories