[Go to site: main page, start]

Skip to main content

Command Palette

Search for a command to run...

Integrations

Bitbucket

Connect Bitbucket Cloud repositories to Cloud Agents and Bugbot. Connect Bitbucket Data Center repositories to Bugbot.

Setup

Bitbucket Cloud setup has two parts, and each part requires a different role:

  • Each developer connects their Bitbucket account so Cursor can clone repositories, push branches, and open pull requests as that user.
  • A Bitbucket workspace admin installs the Cursor app so Bugbot and Cloud Agent status comments can appear as Cursor. Linking the installed app to your Cursor team requires a Cursor team admin with access to the Bitbucket workspace.

Connect your Bitbucket account

Requires access to the Bitbucket workspace repositories you want to use.

  1. Go to Integrations in the dashboard
  2. Click Connect next to Bitbucket
  3. Authorize Cursor in Bitbucket
  4. Return to the dashboard and confirm the integration shows Connected

Each person who starts Cloud Agents or opens pull requests from Cursor should connect their own Bitbucket account.

Install the Cursor app in Bitbucket

A Bitbucket workspace admin must install the Cursor app for the workspace. This gives Cursor a stable app identity for repository events, Bugbot review comments, inline comments, and status updates.

Steps 1 through 4 require a Bitbucket workspace admin. Steps 5 and 6 require a Cursor team admin with access to the Bitbucket workspace. If one person handles the full setup, they need both roles.

  1. Go to Integrations in the dashboard
  2. Find Bitbucket and open the manage menu
  3. Click Install Cursor app
  4. Install the app in your Bitbucket workspace
  5. In Bitbucket workspace settings, under Forge Apps, select Cursor
  6. Click Connect to Cursor and choose the Cursor team to link

When the workspace is linked, the dashboard shows the Cursor app installed for that Bitbucket workspace.

How Cursor uses Bitbucket Cloud identities

Cursor uses different Bitbucket identities for different actions:

ActionBitbucket identity
Bugbot summary comments, inline comments, and build statusesCursor app
Cloud Agent progress comments on pull requestsCursor app
Git clone, branch push, commits, and pull request creationThe connected Bitbucket user

Pull requests opened by Cloud Agents are attributed to the person who started the agent. Bugbot output appears from Cursor when the workspace app is installed.

Permissions

The Bitbucket Cloud integration asks for permissions needed to support Cloud Agents and Bugbot:

PermissionPurpose
AccountIdentify the connected Bitbucket user
RepositoriesList, clone, and read repository content
Pull requestsRead pull request diffs and metadata
Pull request writeCreate pull requests and post comments
WebhooksReceive repository and pull request events

Disconnect Bitbucket Cloud

Disconnecting Bitbucket Cloud has two separate effects:

  • Disconnect account removes your personal Bitbucket OAuth connection from Cursor.
  • Disconnect Cursor app unlinks the Bitbucket workspace from your Cursor team. The app can remain installed in Bitbucket until a workspace admin removes it there.

To fully stop app events from the workspace, uninstall the Cursor app from Bitbucket workspace settings.

Advanced networking

Bitbucket Data Center supports private connection methods for instances that cannot accept traffic from the public internet.

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, 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.

Available for Enterprise customers. Run a reverse proxy tunnel on-premises that establishes an outbound connection to Cursor. Network requests are forwarded through the tunnel, so the Bitbucket instance does not need public inbound 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

Troubleshooting

Bitbucket app installation events can take a few minutes to sync. Wait and retry the Connect to Cursor step from Bitbucket workspace settings.

  • Confirm you are a Cursor team admin. Installing the app requires a Bitbucket workspace admin, but linking the workspace to a Cursor team requires a Cursor team admin.
  • Confirm your Bitbucket user has access to the workspace you are linking.

Install the Cursor app in the Bitbucket workspace and link it to your Cursor team. A personal Bitbucket connection alone is not enough for Cursor app comments.

  • Connect your personal Bitbucket account from the integrations dashboard.
  • Confirm your Bitbucket user has read-write access to the repository.
  • Confirm the repository is on Bitbucket Cloud at bitbucket.org.

  • Confirm the service account token is active.
  • Confirm the service account can access the repositories.
  • Confirm Cursor can reach the instance hostname or configured external host over HTTPS.

  • Confirm you are a Cursor team admin.
  • Confirm the registered instance has a service account token.
  • Confirm the service account has repository admin access.

Next steps

Once Bitbucket is connected, configure the features that use it:

  • Bugbot - automated PR reviews that catch bugs and security issues
  • Cloud Agents - AI agents for Bitbucket Cloud repositories