# Bitbucket MCP tools for AI agents

Source: https://corespeed.io/catalog/bitbucket

Connect Bitbucket to Claude Code, Codex, Cursor or any MCP agent through CoreSpeed. Work in Bitbucket Cloud: browse workspaces, repositories, files, branches and commits; review, comment on, approve and merge pull requests; create branches and commits; and follow pipelines, code-insights reports, deployments and environments. Your agent works through your own Bitbucket account and gets 38 Bitbucket tools; CoreSpeed holds the credential, so the agent never sees the token. Calling it is free.

## Tools

- `bitbucket__list_workspaces`: List the Bitbucket workspaces the connected account belongs to, with whether it administers each.
- `bitbucket__get_workspace`: Get a workspace by slug or UUID.
- `bitbucket__list_repositories`: List the repositories in a workspace that the connected account can see, filterable by role and BBQL (e.g. name, project.key, updated_on).
- `bitbucket__get_repository`: Get a repository — its main branch, project, language, size and links.
- `bitbucket__get_default_reviewers`: List a repository's effective default reviewers — its own plus those inherited from its project — who Bitbucket adds to every new pull request.
- `bitbucket__get_file_content`: Read a file's text, or list a directory, at a branch, tag or commit (default: the main branch). Long files come back in line windows with next_start_line; binary files return their size, not their bytes.
- `bitbucket__get_branch`: Get a branch — its tip commit (target.hash) and allowed merge strategies.
- `bitbucket__get_commit`: Get a commit — author, message, date and parents.
- `bitbucket__list_commit_reports`: List the code-insights reports (tests, coverage, security, bugs) attached to a commit.
- `bitbucket__get_commit_report`: Get one code-insights report on a commit — its result and data fields.
- `bitbucket__get_commit_report_annotations`: List the annotations (findings with file, line, severity) of a code-insights report.
- `bitbucket__list_pull_requests`: List a repository's pull requests — open ones by default — filterable by state and BBQL.
- `bitbucket__get_pull_request`: Get a pull request — branches, commits, description, reviewers and participants with their approval state.
- `bitbucket__get_pull_request_diff`: Get a pull request's unified diff, optionally for chosen files. A diff too long for one call is cut at a line and comes with the changed-file list — ask again with path for the files you need.
- `bitbucket__list_pull_request_comments`: List a pull request's comments — general, inline (with file and line) and replies — oldest first.
- `bitbucket__list_pull_request_tasks`: List a pull request's tasks with their state.
- `bitbucket__list_pipelines`: List a repository's pipeline runs, newest first, filterable by status, branch, commit and trigger.
- `bitbucket__get_pipeline`: Get a pipeline run — state, result, target and duration.
- `bitbucket__list_pipeline_steps`: List the steps of a pipeline run with their state.
- `bitbucket__get_pipeline_step`: Get one step of a pipeline run.
- `bitbucket__get_pipeline_step_log`: Read a pipeline step's log in byte windows — from the start, from start_byte, or the tail (where failures usually are).
- `bitbucket__list_deployments`: List a repository's deployments with their environment, release and state.
- `bitbucket__get_deployment`: Get a deployment.
- `bitbucket__list_environments`: List a repository's deployment environments (e.g. Test, Staging, Production).
- `bitbucket__get_environment`: Get a deployment environment.
- `bitbucket__create_pull_request`: Open a pull request from a branch (or a fork's branch) into the main branch or destination_branch, with a Markdown description and reviewers.
- `bitbucket__update_pull_request`: Change an open pull request's title, description, destination, reviewers, close-source-branch flag or draft state. Only the fields given change; everything else, reviewers included, is kept.
- `bitbucket__merge_pull_request`: Merge a pull request with a chosen strategy and message. If Bitbucket is still merging when the call returns, the result says so — check get_pull_request instead of merging again.
- `bitbucket__approve_pull_request`: Approve a pull request as the connected account.
- `bitbucket__request_changes_on_pull_request`: Request changes on a pull request as the connected account.
- `bitbucket__add_pull_request_comment`: Comment on a pull request — generally, on a file, on a line or line range of the new or old version, or as a reply.
- `bitbucket__resolve_pull_request_comment`: Resolve a comment thread (by its top-level comment).
- `bitbucket__reopen_pull_request_comment`: Reopen a resolved comment thread.
- `bitbucket__create_pull_request_task`: Add a task to a pull request, optionally under a comment.
- `bitbucket__set_pull_request_task_state`: Resolve or reopen a pull request task.
- `bitbucket__create_branch`: Create a branch at a commit.
- `bitbucket__create_commit`: Commit file additions, overwrites and deletions to a branch (created if missing) in one commit, without a clone. Returns the new commit's hash.
- `bitbucket__run_pipeline`: Start a pipeline run for a branch, tag or commit — the matching definition, or a custom one by name, with variables. A custom pipeline can deploy; check its definition first.

## Questions

### Does Bitbucket need my own account?

Yes. Connect your own Bitbucket account once; CoreSpeed holds the credential, and your agents get tools, never the token.

### What does Bitbucket cost on CoreSpeed?

Calling it is free.

### Which agents can use Bitbucket?

Any MCP client, such as Claude Code, Codex, or Cursor. Give your agent the setup line, and the tools join its tool list. Set up an agent: https://corespeed.io/docs/mcp

## Related pages

- [Bitbucket for Claude Code, Codex, and Cursor](https://corespeed.io/integrations/bitbucket): Bring Bitbucket pull requests, pipelines and deployments into your agent. Read the diff, find the failed step, then decide.

## Links

- Catalog: https://corespeed.io/catalog
- Set up an agent: https://corespeed.io/SKILL.md
- Pricing: https://corespeed.io/pricing (Markdown: https://corespeed.io/pricing.md)
