Skip to main content
MCP server CX Codex

Bitbucket MCP — Claude Code MCP server: what it does, how to install

A Go MCP server that gives your agent access to Bitbucket Cloud: repos, branches, pull requests. Useful when Bitbucket work runs through an AI assistant.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env BITBUCKET_USERNAME=<BITBUCKET_USERNAME> --env BITBUCKET_TOKEN=<BITBUCKET_TOKEN> --transport stdio bitbucket-mcp -- docker run -i --rm -e BITBUCKET_USERNAME -e BITBUCKET_TOKEN ghcr.io/fabianschurig/bitbucket-mcp:0.20.2
Open on GitHub

What Bitbucket MCP does

Bitbucket MCP is one of three tools built from the same Bitbucket OpenAPI pipeline in the bitbucket-cli project, alongside the bb-cli command line tool and a Terraform provider. The schema is generated from the live spec, so new Bitbucket endpoints arrive without hand-written glue for each one. The runtime stays thin: auth, dispatch and output are shared.

The server speaks stdio and runs in Docker. Two environment variables are required: BITBUCKET_USERNAME and BITBUCKET_TOKEN. Without them there is no auth and no API calls. Both install commands pass them through --env and -e.

Endpoints missing from the public spec are covered too. Schemas under schema/ can be written by hand, and the generators treat them the same as generated ones. That matters if you need Bitbucket features the open API does not describe.

What it helps with

  • list repositories and branches in Bitbucket Cloud
  • read a pull request and its comments from the agent
  • check branch restrictions for a project
  • fetch commit history without opening a browser
  • wire Bitbucket into an AI assistant workflow

Example prompts for the agent

  • Show me the open pull requests in the backend-api repository
  • What branches exist in web-app?
  • Find commits from the last week in infra

How to install Bitbucket MCP

Platform CLI

claude mcp add --env BITBUCKET_USERNAME=<BITBUCKET_USERNAME> --env BITBUCKET_TOKEN=<BITBUCKET_TOKEN> --transport stdio bitbucket-mcp -- docker run -i --rm -e BITBUCKET_USERNAME -e BITBUCKET_TOKEN ghcr.io/fabianschurig/bitbucket-mcp:0.20.2

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Bitbucket MCP

How do I install Bitbucket MCP in Claude Code?

Run `claude mcp add --env BITBUCKET_USERNAME=<BITBUCKET_USERNAME> --env BITBUCKET_TOKEN=<BITBUCKET_TOKEN> --transport stdio bitbucket-mcp -- docker run -i --rm -e BITBUCKET_USERNAME -e BITBUCKET_TOKEN ghcr.io/fabianschurig/bitbucket-mcp:0.20.2`. Replace the placeholders with your Bitbucket credentials.

What does Bitbucket MCP do?

It exposes Bitbucket Cloud to an AI agent over MCP: repositories, branches, pull requests and other endpoints from the spec. It runs over stdio inside Docker.

What do I need before running it?

Docker installed, plus BITBUCKET_USERNAME and BITBUCKET_TOKEN set to your Bitbucket account details.

Similar MCP servers

Everything for Git and GitHub →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor