Auto-generated from Bitbucket Cloud's OpenAPI spec, this server gives Claude the full Bitbucket API surface through tool calls. You get repo management, pull requests, pipelines, branch restrictions, and everything else in the spec without waiting for manual endpoint additions. It's built in Go, ships as a container, and uses the same code generation pipeline that powers a CLI and Terraform provider. Reach for this when you want Claude to handle Bitbucket operations directly instead of you writing scripts or clicking through the UI. The prompts are customizable, and because it regenerates from the live spec, new Bitbucket features flow in automatically.
Public tool metadata for what this MCP can expose to an agent.
BITBUCKET_CREATE_BRANCHCreates a new branch in a Bitbucket repository from a target commit hash; the branch name must be unique, adhere to Bitbucket's naming conventions, and not include the 'refs/heads/' prefix.4 paramsCreates a new branch in a Bitbucket repository from a target commit hash; the branch name must be unique, adhere to Bitbucket's naming conventions, and not include the 'refs/heads/' prefix.
namestringrepo_slugstringworkspacestringtarget_hashstringBITBUCKET_CREATE_ISSUECreates a new issue in a Bitbucket repository, setting the authenticated user as reporter; ensures assignee (if provided) has repository access, and that any specified milestone, version, or component IDs exist.11 paramsCreates a new issue in a Bitbucket repository, setting the authenticated user as reporter; ensures assignee (if provided) has repository access, and that any specified milestone, version, or component IDs exist.
kindstringtitlestringdue_onstringcontentstringassigneestringprioritystringrepo_slugstringworkspacestringversion_idintegercomponent_idintegermilestone_idintegerBITBUCKET_CREATE_ISSUE_COMMENTAdds a new comment with markdown support to an existing Bitbucket issue.4 paramsAdds a new comment with markdown support to an existing Bitbucket issue.
contentstringissue_idstringrepo_slugstringworkspacestringBITBUCKET_CREATE_PULL_REQUESTCreates a new pull request in a specified Bitbucket repository, ensuring the source branch exists and is distinct from the (optional) destination branch.8 paramsCreates a new pull request in a specified Bitbucket repository, ensuring the source branch exists and is distinct from the (optional) destination branch.
titlestringrepo_slugstringreviewersarrayworkspacestringdescriptionstringsource_branchstringdestination_branchstringclose_source_branchbooleanBITBUCKET_CREATE_REPOSITORYCreates a new Bitbucket 'git' repository in a specified workspace, defaulting to the workspace's oldest project if `project_key` is not provided.9 paramsCreates a new Bitbucket 'git' repository in a specified workspace, defaulting to the workspace's oldest project if `project_key` is not provided.
has_wikibooleanlanguagestringrepo_slugstringworkspacestringhas_issuesbooleanis_privatebooleandescriptionstringfork_policystringallow_forks · no_public_forks · no_forksdefault: allow_forksproject_keystringBITBUCKET_CREATE_SNIPPET_COMMENTPosts a new top-level comment or a threaded reply to an existing comment on a specified Bitbucket snippet.4 paramsPosts a new top-level comment or a threaded reply to an existing comment on a specified Bitbucket snippet.
contentstringparent_idintegerworkspacestringencoded_idstringBITBUCKET_DELETE_ISSUEPermanently deletes a specific issue, identified by its `issue_id`, from the repository specified by `repo_slug` within the given `workspace`.3 paramsPermanently deletes a specific issue, identified by its `issue_id`, from the repository specified by `repo_slug` within the given `workspace`.
issue_idstringrepo_slugstringworkspacestringBITBUCKET_DELETE_REPOSITORYPermanently deletes a specified Bitbucket repository; this action is irreversible and does not affect forks.2 paramsPermanently deletes a specified Bitbucket repository; this action is irreversible and does not affect forks.
repo_slugstringworkspacestringBITBUCKET_GET_CURRENT_USERRetrieves the profile information (UUID, display name, links, creation date) for the currently authenticated Bitbucket user.Retrieves the profile information (UUID, display name, links, creation date) for the currently authenticated Bitbucket user.
No parameter schema in public metadata yet.
BITBUCKET_GET_FILE_FROM_REPOSITORYRetrieves a specific file's content from a Bitbucket repository at a given commit (hash, branch, or tag), failing if the file path is invalid for that commit.4 paramsRetrieves a specific file's content from a Bitbucket repository at a given commit (hash, branch, or tag), failing if the file path is invalid for that commit.
pathstringcommitstringrepo_slugstringworkspacestringBITBUCKET_GET_PULL_REQUESTGet a single pull request by ID with complete details.3 paramsGet a single pull request by ID with complete details.
repo_slugstringworkspacestringpull_request_idintegerBITBUCKET_GET_SNIPPETRetrieves a specific Bitbucket snippet by its encoded ID from an existing workspace, returning its metadata and file structure.3 paramsRetrieves a specific Bitbucket snippet by its encoded ID from an existing workspace, returning its metadata and file structure.
workspacestringencoded_idstringaccept_formatstringBITBUCKET_LIST_PULL_REQUESTSLists pull requests in a specified, accessible Bitbucket repository, optionally filtering by state (OPEN, MERGED, DECLINED).5 paramsLists pull requests in a specified, accessible Bitbucket repository, optionally filtering by state (OPEN, MERGED, DECLINED).
pageintegerstatestringOPEN · MERGED · DECLINEDpagelenintegerrepo_slugstringworkspacestringBITBUCKET_LIST_REPOSITORIES_IN_WORKSPACELists repositories in a specified Bitbucket workspace, accessible to the authenticated user, with options to filter by role or query string, and sort results.4 paramsLists repositories in a specified Bitbucket workspace, accessible to the authenticated user, with options to filter by role or query string, and sort results.
qstringrolestringsortstringworkspacestringBITBUCKET_LIST_WORKSPACE_MEMBERSLists all members of a specified Bitbucket workspace; the workspace must exist.1 paramsLists all members of a specified Bitbucket workspace; the workspace must exist.
workspacestringBITBUCKET_LIST_WORKSPACESLists Bitbucket workspaces accessible to the authenticated user, optionally filtered and sorted.2 paramsLists Bitbucket workspaces accessible to the authenticated user, optionally filtered and sorted.
qstringsortstringBITBUCKET_UPDATE_ISSUEUpdates an existing issue in a Bitbucket repository by modifying specified attributes; requires `workspace`, `repo_slug`, `issue_id`, and at least one attribute to update.12 paramsUpdates an existing issue in a Bitbucket repository by modifying specified attributes; requires `workspace`, `repo_slug`, `issue_id`, and at least one attribute to update.
kindstringstatestringtitlestringcontentstringversionstringissue_idstringprioritystringcomponentstringmilestonestringrepo_slugstringworkspacestringassignee_account_idstringLow-maintenance Bitbucket Cloud tooling built from the live OpenAPI spec: a CLI for software engineers, an MCP server for AI agents, and a Terraform provider for DevSecOps teams.
[!IMPORTANT]
https://github.com/FabianSchurig/bitbucket-cliis the canonical repository. If you found this project through theterraform-provider-bitbucketmirror, watch, star, file issues, and contribute inbitbucket-cli.
| Audience | Best fit | Start here |
|---|---|---|
| DevSecOps engineers | Terraform provider | Terraform Registry, generated provider docs, example: bitbucket_tags |
| Software engineers / computer scientists | bb-cli | CLI usage guide |
| AI agents / agent platform users | bb-mcp | MCP usage guide |
FabianSchurig/bitbucketterraform-provider-bitbucketbrew tap FabianSchurig/tap
brew install bitbucket-cli
Download the .deb package from the latest release and install it. Supported architectures: amd64, arm64.
TAG_URL=$(curl -fsSIL -o /dev/null -w '%{url_effective}' https://github.com/FabianSchurig/bitbucket-cli/releases/latest)
VERSION=${TAG_URL##*/}
VERSION=${VERSION%%\?*}
VERSION=${VERSION%%\#*}
VERSION=${VERSION#v}
ARCH=$(dpkg --print-architecture)
curl -LO "https://github.com/FabianSchurig/bitbucket-cli/releases/download/v${VERSION}/bb-cli_${VERSION}_${ARCH}.deb"
sudo dpkg -i "bb-cli_${VERSION}_${ARCH}.deb"
Replace bb-cli with bb-mcp to install the MCP server instead.
Download the .rpm package from the latest release and install it. Supported architectures: amd64, arm64.
TAG_URL=$(curl -fsSIL -o /dev/null -w '%{url_effective}' https://github.com/FabianSchurig/bitbucket-cli/releases/latest)
VERSION=${TAG_URL##*/}
VERSION=${VERSION%%\?*}
VERSION=${VERSION%%\#*}
VERSION=${VERSION#v}
ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
curl -LO "https://github.com/FabianSchurig/bitbucket-cli/releases/download/v${VERSION}/bb-cli_${VERSION}_${ARCH}.rpm"
sudo rpm -i "bb-cli_${VERSION}_${ARCH}.rpm"
Replace bb-cli with bb-mcp to install the MCP server instead.
scoop bucket add bitbucket https://github.com/FabianSchurig/scoop-bucket
scoop install bb-cli
scoop install bb-mcp
winget install FabianSchurig.bb-cli
winget install FabianSchurig.bb-mcp
curl -fsSL https://raw.githubusercontent.com/FabianSchurig/bitbucket-cli/main/install.sh | sh
See install.sh options for version selection, binary choice (bb-cli, bb-mcp, or all), and custom install directories.
| Method | Command |
|---|---|
| Go install | go install github.com/FabianSchurig/bitbucket-cli/cmd/bb-cli@latest |
| Docker | docker pull ghcr.io/fabianschurig/bitbucket-cli:latest |
| Download binaries | GitHub Releases |
For full installation details see the CLI usage guide and the MCP usage guide.
This repository keeps Bitbucket Cloud tooling maintainable by generating most of the surface area from the live Bitbucket OpenAPI spec.
schema/ can be hand-authored for endpoints that are not in Bitbucket's public OpenAPI spec (for example the project-level branch-restrictions endpoint exposed only via https://bitbucket.org/!api/internal/...). The generators and runtime treat them identically — schema paths may use absolute URLs and the dispatcher passes them through unchanged.flowchart LR
A[Live Bitbucket OpenAPI spec] --> B[enrich_spec.py]
B --> C[partition_spec.py]
C --> D[schema/*-schema.yaml]
D --> E[oapi-codegen models]
D --> F[CLI generator]
D --> G[MCP generator]
D --> H[Terraform generator]
E --> I[Shared generated types]
F --> J[bb-cli]
G --> K[bb-mcp]
H --> L[terraform-provider-bitbucket]
I --> J
I --> K
I --> L
M[Hand-written runtime\nauth, dispatch, output, MCP handler, TF runtime] --> J
M --> K
M --> L
In practice:
flowchart TD
A[push / pull_request] --> B[ci.yml]
A --> C[terraform-tests.yml]
D[schedule / manual] --> E[schema-sync.yml]
E --> F[Fetch live spec]
F --> G[Regenerate code and docs]
G --> H[Build and test]
H --> I[Tag new version]
I --> J[release.yml]
J --> K[docker.yml]
I --> L[terraform-release.yml]
K --> M[Publish to MCP Registry]
ci.yml: builds, lints, vets, runs Go tests, and sends analysis to SonarQube Cloud.terraform-tests.yml: runs mock-based Terraform acceptance and terraform test suites, plus real API tests when credentials exist. See docs/e2e-coverage.md for the current list of endpoints exercised by the real-API tests.schema-sync.yml: daily/manual sync that fetches the live Bitbucket spec, regenerates generated artifacts, rebuilds docs, tests everything, and tags a release when the schema changed.release.yml: publishes tagged binary releases via GoReleaser.docker.yml: builds multi-arch container images for bb-cli and bb-mcp, pushes them to GHCR, and publishes the bb-mcp server to the MCP Registry.terraform-release.yml: mirrors the tagged source into terraform-provider-bitbucket and publishes the Terraform provider release.DrFaust92/terraform-provider-bitbucket| Aspect | DrFaust92/terraform-provider-bitbucket | FabianSchurig/bitbucket |
|---|---|---|
| Maintenance model | Hand-written provider resources | Mostly generated from the live Bitbucket OpenAPI spec |
| Scope | Terraform provider only | Terraform provider + CLI + MCP server in one canonical repo |
| API coverage model | Curated, typed resources | Broad endpoint coverage through grouped generic resources/data sources |
| Update flow | Manual feature work per resource | Schema sync pipeline regenerates code and docs |
| Resource shape | Resource-specific typed fields | Generic params, response fields, and raw API response |
| Best fit | Opinionated Terraform workflows | Teams that want fast Bitbucket API coverage and shared tooling across Terraform, shells, and AI agents |
This project optimizes for breadth, maintenance, and shared infrastructure across interfaces. If you want a heavily hand-modeled Terraform UX, the DrFaust92 provider may feel more familiar. If you want one maintained pipeline that keeps Terraform, CLI, and MCP aligned with Bitbucket Cloud, this repository is designed for that.
Use the short guides on this first page to get started, then switch to the detailed docs for the interface you need.
TestAccRealAPI_* tests, and which are still missing coverage.The Terraform documentation under docs/ is generated. The root README stays focused on orientation, links, architecture, maintenance, and contribution entry points.
bitbucket-cli repository.BITBUCKET_USERNAMEYour Bitbucket username/ email (required for Basic auth, omit for workspace/repo access tokens)
BITBUCKET_TOKEN*secretYour Bitbucket API token or OAuth2 access token
ray0907/git-mcp-server
cyanheads/git-mcp-server
io.github.b1ff/atlassian-dc-mcp-bitbucket
io.github.b1ff/atlassian-dc-mcp-jira
com.mcparmory/atlassian-jira
sirlordt/vscode-terminal-mcp