# Bitbucket MCP Server

> Bitbucket MCP Server is an open-source MCP server for developer tools. Review pull requests, run pipelines and manage Bitbucket Cloud repos from an AI assistant. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI
- **Repository:** https://github.com/lawp09/bitbucket-mcp
- **MCP Registry name:** io.github.lawp09/bitbucket-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

This Python server covers a wide slice of the Bitbucket Cloud API: repositories, pull requests, comments and tasks, diffs, commits, source browsing, issues, deployments and environments, branch restrictions and workspace permissions. The README counts 60-plus tools, and every tool carries MCP read-only and destructive annotations so clients can auto-approve reads and warn on risky calls.

Pull request work goes beyond basics: draft pull requests, suggested reviewers, a review summary, pending-review discovery and a batch review submission. Pipeline support includes runs, steps and logs plus variables, schedules and caches. Merging a pull request and stopping a pipeline are disabled by default for safety, and the tool set can be trimmed through a tools.json config.

Responses are slimmed to save tokens. Authentication uses a scoped Bitbucket API token (a global token without scopes does not work) along with username and workspace in environment variables or the system keychain. Run it with uvx from PyPI; it is MIT-licensed.

## Features

- **Pull request lifecycle:** Create, update, approve, decline and comment, with draft support.
- **Pipeline control:** Inspect runs, steps and logs, and manage variables and schedules.
- **Safety defaults:** Merge and stop-pipeline tools are off until enabled.
- **Tool annotations:** Read-only and destructive hints guide client prompts.
- **Configurable toolset:** Enable or disable tools through a JSON file or env variable.

## Good for

- Summarise a pull request's diff and comments
- Find pull requests waiting for your review
- Check why a pipeline run failed from step logs
- Manage issues and commit comments by chat
- Audit branch restrictions and workspace permissions

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add bitbucket-mcp -- uvx bitbucket-mcp-py
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "bitbucket-mcp": {
      "command": "uvx",
      "args": [
        "bitbucket-mcp-py"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "bitbucket-mcp": {
      "command": "uvx",
      "args": [
        "bitbucket-mcp-py"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "bitbucket-mcp": {
      "command": "uvx",
      "args": [
        "bitbucket-mcp-py"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "bitbucket-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "bitbucket-mcp-py"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add bitbucket-mcp -- uvx bitbucket-mcp-py
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.bitbucket-mcp]
command = "uvx"
args = ["bitbucket-mcp-py"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "bitbucket-mcp": {
      "command": "uvx",
      "args": [
        "bitbucket-mcp-py"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user bitbucket-mcp uvx -- bitbucket-mcp-py

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "bitbucket-mcp": {
      "command": "uvx",
      "args": [
        "bitbucket-mcp-py"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "bitbucket-mcp": {
      "command": "uvx",
      "args": [
        "bitbucket-mcp-py"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "bitbucket-mcp": {
      "command": "uvx",
      "args": [
        "bitbucket-mcp-py"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "bitbucket-mcp": {
      "command": "uvx",
      "args": [
        "bitbucket-mcp-py"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "bitbucket-mcp": {
      "command": "uvx",
      "args": [
        "bitbucket-mcp-py"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "bitbucket-mcp": {
      "command": "uvx",
      "args": [
        "bitbucket-mcp-py"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "bitbucket-mcp": {
      "command": "uvx",
      "args": [
        "bitbucket-mcp-py"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "bitbucket-mcp": {
      "command": "uvx",
      "args": [
        "bitbucket-mcp-py"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 6 of 14 tools change data; 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `list_repositories` (name suggests: reads): Lists repositories in the workspace.
- `get_pull_requests` (name suggests: reads): Lists pull requests.
- `create_pull_request` (name suggests: changes): Creates a pull request.
- `approve_pull_request` (name suggests: changes): Approves a pull request.
- `merge_pull_request` (name suggests: changes): Merges a pull request; disabled by default.
- `get_pull_request_diff` (name suggests: reads): Returns a pull request's diff.
- `add_pull_request_comment` (name suggests: changes): Adds a comment to a pull request.
- `submit_pull_request_batch_review`: Submits a batch review.
- `list_pipeline_runs` (name suggests: reads): Lists pipeline runs.
- `get_pipeline_step_logs` (name suggests: reads): Reads pipeline step logs.
- `run_pipeline` (name suggests: changes): Triggers a pipeline.
- `stop_pipeline` (name suggests: changes): Stops a pipeline; disabled by default.
- `list_issues` (name suggests: reads): Lists issues.
- `get_file_content` (name suggests: reads): Reads a file from the repository.

## FAQ

### What credentials does Bitbucket MCP Server need?

A Bitbucket email, a scoped API token and your workspace slug.

### Can Bitbucket MCP Server merge pull requests?

Only if you enable merge_pull_request, which is off by default.

### Which clients are documented?

Claude Code, OpenAI Codex, Cursor and VS Code with GitHub Copilot.

### How is Bitbucket MCP Server installed?

uvx --from bitbucket-mcp-py bitbucket-mcp.

### Is Bitbucket MCP Server free?

Yes. Bitbucket MCP Server is open source, so you can use and self-host it for free.

### How do I add Bitbucket MCP Server to Claude Code?

Run this command in your terminal: claude mcp add bitbucket-mcp -- uvx bitbucket-mcp-py

### What are the best alternatives to Bitbucket MCP Server?

The closest alternatives to Bitbucket MCP Server are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/bitbucket-mcp-server-2
