Interacting with Bitbucket via MCP

The Bitbucket Cloud MCP server lets any supported agent runtime interact securely with Bitbucket. It exposes tools that your agent can use to automate tasks simply by having them referenced in your natural language prompts.

Example prompt:

“Review the comments on the referenced pull request, implement any suggested feedback, then push your changes back to the source branch of the PR”.


How to use

You don’t need to configure this server yourself. To use it, simply:

  • make sure the step has the required auth scopes, and

  • Describe in your prompt what the agent should do (for example, “commit changes and create a pull request”).

The Bitbucket MCP server exposes tools such as:

Tool name

What it does

Auth Scopes required

createPullRequest

Create a new pull request

write:pullrequest:bitbucket

getPullRequests

Get a list of pull requests

read:pullrequest:bitbucket

getPullRequestDetails

Fetch details about a pull request

read:pullrequest:bitbucket

getPullRequestComments

List comments on a pull request

read:pullrequest:bitbucket

addPullRequestComment

Add a comment to a pull request or to a file that was changed

write:pullrequest:bitbucket

updatePullRequestComment

Edit an existing pull request comment that was created by an agent

write:pullrequest:bitbucket

getPullRequestTasks

List tasks on a pull request

read:pullrequest:bitbucket

createPullRequestTask

Add a task to a pull request

write:pullrequest:bitbucket

updatePullRequestTask

Update a pull request task

write:pullrequest:bitbucket

analyzePullRequestCommitStatusFailures

Analyze failed commit statuses on a pull request

read:pullrequest:bitbucket
read:pipeline:bitbucket

analyzePipelineStepFailure

Analyze why a pipeline step failed

read:pipeline:bitbucket

Learn more:

 

Still need help?

The Atlassian Community is here for you.