MCP Server Atlassian Bitbucket

Raw access to the Bitbucket Cloud REST API 2.0 through five HTTP-verb tools plus a repo clone tool

By Andi Ashari (individual) TypeScript Local · stdio Git and code hosting

60 popularity score ★ 164 ↓ 9.5k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs ATLASSIAN_USER_EMAIL, ATLASSIAN_API_TOKEN. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add atlassian-bitbucket -e ATLASSIAN_USER_EMAIL=<ATLASSIAN_USER_EMAIL> -e ATLASSIAN_API_TOKEN=<ATLASSIAN_API_TOKEN> -- npx -y @aashari/mcp-server-atlassian-bitbucket
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "atlassian-bitbucket": {
      "command": "npx",
      "args": [
        "-y",
        "@aashari/mcp-server-atlassian-bitbucket"
      ],
      "env": {
        "ATLASSIAN_USER_EMAIL": "<ATLASSIAN_USER_EMAIL>",
        "ATLASSIAN_API_TOKEN": "<ATLASSIAN_API_TOKEN>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "atlassian-bitbucket": {
      "command": "npx",
      "args": [
        "-y",
        "@aashari/mcp-server-atlassian-bitbucket"
      ],
      "env": {
        "ATLASSIAN_USER_EMAIL": "<ATLASSIAN_USER_EMAIL>",
        "ATLASSIAN_API_TOKEN": "<ATLASSIAN_API_TOKEN>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "atlassian-bitbucket": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@aashari/mcp-server-atlassian-bitbucket"
      ],
      "env": {
        "ATLASSIAN_USER_EMAIL": "<ATLASSIAN_USER_EMAIL>",
        "ATLASSIAN_API_TOKEN": "<ATLASSIAN_API_TOKEN>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.atlassian-bitbucket]
command = "npx"
args = ["-y", "@aashari/mcp-server-atlassian-bitbucket"]

[mcp_servers.atlassian-bitbucket.env]
ATLASSIAN_USER_EMAIL = "<ATLASSIAN_USER_EMAIL>"
ATLASSIAN_API_TOKEN = "<ATLASSIAN_API_TOKEN>"
Gemini CLITerminal
gemini mcp add --scope user -e ATLASSIAN_USER_EMAIL=<ATLASSIAN_USER_EMAIL> -e ATLASSIAN_API_TOKEN=<ATLASSIAN_API_TOKEN> atlassian-bitbucket npx -- -y @aashari/mcp-server-atlassian-bitbucket

Settings 9

ATLASSIAN_USER_EMAIL Required: Your Atlassian account email, used with a scoped API token. Alternatively set ATLASSIAN_BITBUCKET_USERNAME with an app password.
ATLASSIAN_API_TOKEN Required: Atlassian scoped API token for Bitbucket (starts with ATATT). Alternatively set ATLASSIAN_BITBUCKET_APP_PASSWORD.
ATLASSIAN_BITBUCKET_USERNAME Optional: Bitbucket username for the legacy app-password sign-in.
ATLASSIAN_BITBUCKET_APP_PASSWORD Optional: Legacy Bitbucket app password; being retired by June 2026.
BITBUCKET_DEFAULT_WORKSPACE Optional: Workspace used when a clone call gives none.
ATLASSIAN_REQUEST_TIMEOUT Optional: Timeout for each API request, in milliseconds.
TRANSPORT_MODE Optional: stdio (default) or http.
PORT Optional: Port for HTTP mode, 3000 by default.
DEBUG Optional: Set to true for detailed logs, written under ~/.mcp/data/.

What it does

An independent, community-built server for Bitbucket Cloud. Rather than one tool per task, version 2.0 and later expose the Bitbucket REST API 2.0 directly: `bb_get`, `bb_post`, `bb_put`, `bb_patch` and `bb_delete` take an API path (the `/2.0` prefix is added for you), optional query parameters and, for writes, a JSON body. Anything the API offers is therefore reachable: workspaces, repositories, branches, commits, file contents, diffs, pull requests and their comments, approvals and merges, issues, pipelines and deployments. A sixth tool, `bb_clone`, clones a repository to a local folder.

Responses come back in TOON, a compact table-like text format, unless `outputFormat` is set to `json`, and each call accepts a JMESPath expression in `jq` to trim the result before the assistant sees it. In the 3.1.0 code, any tool result longer than 40,000 characters is cut at a line break with a note on how much was shown, and the full API response is written to a file under `/tmp/mcp/` so it can be read later (src/utils/formatter.util.ts, src/utils/response.util.ts).

The same package doubles as a command-line client: passing a subcommand such as `get` or `post` runs one request and prints JSON instead of starting the server. It speaks stdio by default; setting `TRANSPORT_MODE=http` starts a Streamable HTTP listener on 127.0.0.1, port 3000 unless `PORT` is set.

What it needs

RuntimeNode.js 18+

Node.js 18 or later (run through npx). A Bitbucket Cloud account with either an Atlassian scoped API token (scopes `repository` and `workspace`, plus `pullrequest` for pull request changes) used with your Atlassian email, or a legacy Bitbucket app password with your username. `bb_clone` also needs git on PATH and SSH keys set up for Bitbucket, or it falls back to HTTPS.

Limits

Works with Bitbucket Cloud only, not Bitbucket Server or Data Center. Its makers warn that Bitbucket app passwords are being retired by June 2026, so the `ATLASSIAN_BITBUCKET_USERNAME`/`ATLASSIAN_BITBUCKET_APP_PASSWORD` route may stop working; use a scoped API token. There are no task-shaped tools: the assistant must know the right REST path and body for each action, and paths are case-sensitive. Tool output is capped at 40,000 characters per call, with the rest saved to a file. Bitbucket Cloud rate limits apply. Version 1.x tool names such as `bb_ls_prs` were removed in 2.0.

Who it suits

Suits Bitbucket Cloud users who want an assistant to do anything the REST API allows, from reading diffs to opening, commenting on, approving and merging pull requests, and who are comfortable with an assistant composing raw API calls. It runs on your own machine with your own token, so the token's scopes decide how far it can go; a read-only token keeps it to reading. Teams on Bitbucket Server or Data Center need a different server, such as atlassian-dc-mcp (@atlassian-dc-mcp/bitbucket), which we also list. Anyone who prefers fixed, named tools for each task over generic HTTP calls may find a task-based Bitbucket server easier to keep in check.

Tools 6

bb_get
Send a GET request to any Bitbucket API path and return the result (read-only)
bb_post
Send a POST with a JSON body to create things such as pull requests, comments or approvals
bb_put
Send a PUT with a JSON body to replace a resource
bb_patch
Send a PATCH with a JSON body to change part of a resource
bb_delete
Send a DELETE to remove a resource such as a branch or a pull request approval
bb_clone
Clone a repository into a folder under a given absolute path, by SSH or else HTTPS

Similar servers