The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Bitbucket MCP listing page.
Low-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-bitbucketTo install the CLI tool via our custom tap, tap the repository and explicitly trust the formula to reduce supply chain risks:
Or to install the MCP server:
(Note: If you previously tapped the old cask, you can safely untap via brew untap fabianschurig/tap before running the command).
Download the .deb package from the latest release and install it. Supported architectures: amd64, arm64.
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.
Replace bb-cli with bb-mcp to install the MCP server instead.
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.In practice:
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, publishes their SBOM and CVE reports (see Supply chain: SBOM and CVE reports), 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.The live OpenAPI document is treated as an input, not as an authority to delete a working API group because of a transient omission. Three mechanisms keep the daily sync from breaking published surface or itself:
partition_spec.py
preserves its existing populated schema; a genuinely empty or new group is
still written normally.schema/operation-ids.json, keyed by
"<method> <path>". An operation keeps its id forever, and ids of removed
operations stay reserved — so a sibling endpoint can never inherit an id and
silently rename a shipped CLI command, MCP tool, or CRUDConfig reference.partition_spec.py carries such operations
forward verbatim from the committed schema, annotated x-bb-cli-retained: true
so the schema diff shows exactly what upstream stopped publishing. Retiring one
for good is a deliberate act: delete it from schema/*-schema.yaml, and the
invariant tests then flag any hand-maintained mapping (for example in
CRUDConfig) that still references it.Acceptance tests in internal/tfprovider/acceptance_test.go are hand-written and
are never deleted by schema generation. Generated Terraform fixtures are
regenerated from the surviving resource groups, while the schema-sync build and
test gate, including the mock Terraform acceptance suites, must pass before any
change is committed or released. The generated
real-API coverage report makes missing group coverage
visible without requiring manual bookkeeping.
Every released container image ships with a Software Bill of Materials and a vulnerability report in standard formats. Both are produced from the exact image digest that was pushed to GHCR.
| Artifact | Format | Where to get it |
|---|---|---|
| Image SBOM | SPDX 2.3 JSON | sbom-bitbucket-cli.spdx.json / sbom-bitbucket-mcp.spdx.json on the matching GitHub Release, or as a signed attestation on the image itself |
| Image CVE report | Grype JSON + plain-text table | cves-bitbucket-cli.{json,txt} / cves-bitbucket-mcp.{json,txt} on the matching GitHub Release |
| Source SBOM | SPDX JSON | Attached to the GitHub Release by release.yml (covers the git tag, not the image) |
The SBOM is also attached to the image as a signed, digest-bound GitHub attestation, so consumers can verify and fetch it without any access to this repository:
Runtime images are built FROM scratch and contain only the static binary plus CA certificates, so the SBOM is deliberately small and there is no OS package surface to patch.
Vulnerability scan results are additionally uploaded to GitHub code scanning (categories docker-bitbucket-cli and docker-bitbucket-mcp) for maintainers, and the Go module tree is checked by govulncheck in security.yml.
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.