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 pull request”.
How to use the MCP
The Atlassian MCP server exposes wrapper tools for reading and writing content to Atlassian products. Step Authentication tokens with Bitbucket-specific scopes grant permissions to invoke Bitbucket specific tools using these wrapper tools. These scopes follow Bitbucket’s API token scope rules. The following scopes are supported:
リソース | サポートされているスコープ |
|---|---|
リポジトリ |
|
プル リクエスト |
|
Pipelines |
|
Read and write scopes need to be specified explicitly - so if your agent needs to run pipelines and read their results, explicitly include both read:pipeline:bitbucket and write:pipeline:bitbucket. When added, the resulting token contains the read:bitbucket:agent-interface and write:bitbucket:agent-interface scopes as mentioned in our developer documentation.
For more fine-grained controlled over picking the tools to allow or deny, use the permissions.on-ask property. See the Tool permission section of Agent configuration for more information.
Legacy MCP connection
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 | 動作 | API Token scope required |
|---|---|---|
| Create a new pull request |
|
| Get a list of pull requests |
|
| Fetch details about a pull request |
|
| List comments on a pull request |
|
| Add a comment to a pull request or to a file that was changed |
|
| Edit an existing pull request comment that was created by an agent |
|
| List tasks on a pull request |
|
| Add a task to a pull request |
|
| Update a pull request task |
|
| Analyze failed commit statuses on a pull request |
|
| Analyze why a pipeline step failed |
|
詳細:
この内容はお役に立ちましたか?