# Bitbucket

> Manage Bitbucket Cloud repos, pipelines, and pull requests from an AI agent.

[Canonical HTML page](https://top-mcps.com/mcp/bitbucket) · [server.json](https://top-mcps.com/mcp/bitbucket.json) · [methodology](https://top-mcps.com/about/methodology)

## Install

### Claude Desktop — `claude_desktop_config.json`

Paste under mcpServers. Fully quit and reopen Claude after editing.

```json
{
  "mcpServers": {
    "bitbucket": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "BITBUCKET_USERNAME",
        "-e",
        "BITBUCKET_APP_PASSWORD",
        "-e",
        "BITBUCKET_WORKSPACE",
        "ghcr.io/atlassian/mcp-server-atlassian:latest"
      ],
      "env": {
        "BITBUCKET_USERNAME": "${BITBUCKET_USERNAME}",
        "BITBUCKET_APP_PASSWORD": "${BITBUCKET_APP_PASSWORD}",
        "BITBUCKET_WORKSPACE": "${BITBUCKET_WORKSPACE}"
      }
    }
  }
}
```

### Claude Code — `CLI or .mcp.json`

Run from your repo. Commit .mcp.json to share with your team.

```shell
# export BITBUCKET_USERNAME=reader
# export BITBUCKET_APP_PASSWORD=changeme
# export BITBUCKET_WORKSPACE=my-team
claude mcp add bitbucket -- docker run --rm -i -e BITBUCKET_USERNAME -e BITBUCKET_APP_PASSWORD -e BITBUCKET_WORKSPACE ghcr.io/atlassian/mcp-server-atlassian:latest
```

### Cursor — `.cursor/mcp.json`

Global path: ~/.cursor/mcp.json. Reload window after editing.

```json
{
  "mcpServers": {
    "bitbucket": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "BITBUCKET_USERNAME",
        "-e",
        "BITBUCKET_APP_PASSWORD",
        "-e",
        "BITBUCKET_WORKSPACE",
        "ghcr.io/atlassian/mcp-server-atlassian:latest"
      ],
      "env": {
        "BITBUCKET_USERNAME": "${BITBUCKET_USERNAME}",
        "BITBUCKET_APP_PASSWORD": "${BITBUCKET_APP_PASSWORD}",
        "BITBUCKET_WORKSPACE": "${BITBUCKET_WORKSPACE}"
      }
    }
  }
}
```

### VS Code — `.vscode/mcp.json`

VS Code uses the "servers" key (not "mcpServers").

```jsonc
{
  "servers": {
    "bitbucket": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "BITBUCKET_USERNAME",
        "-e",
        "BITBUCKET_APP_PASSWORD",
        "-e",
        "BITBUCKET_WORKSPACE",
        "ghcr.io/atlassian/mcp-server-atlassian:latest"
      ],
      "env": {
        "BITBUCKET_USERNAME": "${BITBUCKET_USERNAME}",
        "BITBUCKET_APP_PASSWORD": "${BITBUCKET_APP_PASSWORD}",
        "BITBUCKET_WORKSPACE": "${BITBUCKET_WORKSPACE}"
      }
    }
  }
}
```

### Windsurf — `~/.codeium/windsurf/mcp_config.json`

Open via Cascade → hammer icon → Configure.

```json
{
  "mcpServers": {
    "bitbucket": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "BITBUCKET_USERNAME",
        "-e",
        "BITBUCKET_APP_PASSWORD",
        "-e",
        "BITBUCKET_WORKSPACE",
        "ghcr.io/atlassian/mcp-server-atlassian:latest"
      ],
      "env": {
        "BITBUCKET_USERNAME": "${BITBUCKET_USERNAME}",
        "BITBUCKET_APP_PASSWORD": "${BITBUCKET_APP_PASSWORD}",
        "BITBUCKET_WORKSPACE": "${BITBUCKET_WORKSPACE}"
      }
    }
  }
}
```

### Cline — `cline_mcp_settings.json`

Open via the Cline sidebar → MCP Servers → Edit.

```json
{
  "mcpServers": {
    "bitbucket": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "BITBUCKET_USERNAME",
        "-e",
        "BITBUCKET_APP_PASSWORD",
        "-e",
        "BITBUCKET_WORKSPACE",
        "ghcr.io/atlassian/mcp-server-atlassian:latest"
      ],
      "env": {
        "BITBUCKET_USERNAME": "${BITBUCKET_USERNAME}",
        "BITBUCKET_APP_PASSWORD": "${BITBUCKET_APP_PASSWORD}",
        "BITBUCKET_WORKSPACE": "${BITBUCKET_WORKSPACE}"
      }
    }
  }
}
```

### Continue — `~/.continue/config.json`

Continue uses modelContextProtocolServers with a transport block.

```json
{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "docker",
          "args": [
            "run",
            "--rm",
            "-i",
            "-e",
            "BITBUCKET_USERNAME",
            "-e",
            "BITBUCKET_APP_PASSWORD",
            "-e",
            "BITBUCKET_WORKSPACE",
            "ghcr.io/atlassian/mcp-server-atlassian:latest"
          ],
          "env": {
            "BITBUCKET_USERNAME": "${BITBUCKET_USERNAME}",
            "BITBUCKET_APP_PASSWORD": "${BITBUCKET_APP_PASSWORD}",
            "BITBUCKET_WORKSPACE": "${BITBUCKET_WORKSPACE}"
          }
        }
      }
    ]
  }
}
```

### Codex CLI — `~/.codex/config.toml`

Codex uses TOML. Each server is a [mcp_servers.<name>] subtable.

```shell
# ~/.codex/config.toml
[mcp_servers.bitbucket]
command = "docker"
args = [
  "run",
  "--rm",
  "-i",
  "-e",
  "BITBUCKET_USERNAME",
  "-e",
  "BITBUCKET_APP_PASSWORD",
  "-e",
  "BITBUCKET_WORKSPACE",
  "ghcr.io/atlassian/mcp-server-atlassian:latest",
]
env = { BITBUCKET_USERNAME = "${BITBUCKET_USERNAME}", BITBUCKET_APP_PASSWORD = "${BITBUCKET_APP_PASSWORD}", BITBUCKET_WORKSPACE = "${BITBUCKET_WORKSPACE}" }
```

### Zed — `~/.config/zed/settings.json`

Zed calls them "context_servers". Settings live-reload on save.

```jsonc
{
  "context_servers": {
    "bitbucket": {
      "command": {
        "path": "docker",
        "args": [
          "run",
          "--rm",
          "-i",
          "-e",
          "BITBUCKET_USERNAME",
          "-e",
          "BITBUCKET_APP_PASSWORD",
          "-e",
          "BITBUCKET_WORKSPACE",
          "ghcr.io/atlassian/mcp-server-atlassian:latest"
        ]
      },
      "env": {
        "BITBUCKET_USERNAME": "${BITBUCKET_USERNAME}",
        "BITBUCKET_APP_PASSWORD": "${BITBUCKET_APP_PASSWORD}",
        "BITBUCKET_WORKSPACE": "${BITBUCKET_WORKSPACE}"
      }
    }
  }
}
```

### ChatGPT — `ChatGPT → Apps directory`

Bitbucket doesn't ship a hosted HTTPS endpoint today. ChatGPT supports remote MCP servers only — to use this server in ChatGPT you'll need to deploy it to a public HTTPS URL first (e.g. via Cloudflare Workers or Vercel) or wait for an official remote build.

```none

```

## At a glance

- **Maintainer:** Atlassian
- **Transport:** stdio
- **Auth model:** OAuth 2.1
- **Required secrets:** BITBUCKET_USERNAME, BITBUCKET_APP_PASSWORD, BITBUCKET_WORKSPACE
- **Supported clients:** Claude, Cursor, VS Code, Windsurf, Any MCP-compatible client, Bitbucket Cloud workspaces
- **License:** Apache-2.0
- **Language:** TypeScript
- **Latest version:** latest
- **Last verified:** 2026-06-02
- **Score:** 64/100 (rubric 2026-04 — see https://top-mcps.com/about/methodology)
- **Source:** https://github.com/atlassian/mcp-server-atlassian

## Tools & permissions

| Tool | Description | Args | Side effects |
|------|-------------|------|--------------|
| `list_repos` | List repositories in a workspace. | `workspace: string` | read |
| `get_pull_request` | Return metadata, files, and reviewers for a PR. | `workspace: string, repo: string, id: number` | read |
| `list_pipelines` | List recent Pipelines runs for a repo. | `workspace: string, repo: string` | read |
| `create_comment` | Add a comment on a PR. Requires write scope. | `pr_id: number, body: string` | write |

## Security & scope

- **Access scope:** read-only
- **Sandbox:** Authenticates with a Bitbucket app password or OAuth token scoped to the smallest set of permissions the workflow needs. The MCP defaults to read-only tools.
- **Gotchas:**
  - App passwords with admin scope can delete branches; scope them to repo:read for agent use.
  - OAuth grants are workspace-wide — review which workspaces you authorise before consent.
  - Bitbucket rate-limits at 1000 requests/hour per user; a chatty agent can exhaust the budget on large workspaces.

## Quick answer

**What it does.** Wraps the Bitbucket Cloud REST API for repository, PR, branch, and Pipelines operations. Read-only by default; writes require explicit per-tool gates.

**Best for:**
- Atlassian-stack teams
- PR triage and review on Bitbucket
- Pipelines failure investigation
- Branch restriction audits
- Cross-product agent workflows with Jira

**Not for:**
- Bitbucket Server self-hosted
- Teams already on GitHub or GitLab (use those MCPs)
- Workflows that need Bitbucket's deprecated 1.0 API surface

## Description

The Atlassian Bitbucket MCP connects an AI agent to a Bitbucket Cloud workspace. Lists repositories, reads files and diffs, opens and reviews pull requests, inspects Bitbucket Pipelines runs, and manages branch restrictions. Built for teams that live in the Atlassian stack — Bitbucket plus Jira plus Confluence — and want a consistent agent surface across all three.

## Why it matters

Bitbucket Cloud is the default Git host for Atlassian shops. Without a Bitbucket MCP an agent in those teams has nothing to grab; with it, the same conversational PR-review workflow works alongside the Jira and Confluence MCPs in the same chat.

## Key features

- Bitbucket Cloud REST API coverage
- PR + Pipelines + branch tools
- OAuth or app-password auth
- Workspace scoping at connect time
- Pairs with the Atlassian Jira and Confluence MCPs

## FAQ

### OAuth or app password?

Both are supported. App passwords are simpler to set up for personal automations; OAuth is recommended for shared installations because tokens carry user-level audit trails.

### Does it support Bitbucket Server?

No — only Bitbucket Cloud. The Server (self-hosted) API differs in URL shape and pagination; a separate server-specific MCP is required.

### Can the agent fail a Pipelines build?

It can read status and trigger reruns, but it cannot mark a build as failed. Build status is sourced from the Pipelines runners themselves.

## Changelog

- **2026-06-02** — Refreshed install snippets and fact sheet; verified for 2026.
- **2025-04-10** — Initial directory listing.
