Skip to main content
Glama
bitbucket-mcp

bitbucket-mcp

by Zomino

bitbucket-mcp

⚠️ This is a personal project built for fun and carries no support or guarantees. For anything that matters, prefer the official Atlassian MCP server.

An MCP server for Bitbucket Cloud, covering pull requests, pull request comments, and pipelines. Distributed as a Claude Code plugin.

Setup

Requires uv on PATH.

1. Install

claude plugin marketplace add Zomino/bitbucket-mcp
claude plugin install bitbucket@bitbucket

2. Create a token

Create a Bitbucket API token at https://id.atlassian.com/manage-profile/security/api-tokens. Grant exactly these scopes:

Scope

Why

read:pullrequest:bitbucket

List and read pull requests, diffs, commits, statuses, and comments

write:pullrequest:bitbucket

Create, update, comment, approve, request changes, decline, and merge

read:pipeline:bitbucket

Read pipelines, steps, and step logs

read:repository:bitbucket

Read the repository content behind pull request diffs and commits

With BITBUCKET_READ_ONLY=true, drop write:pullrequest:bitbucket and grant only the three read: scopes.

3. Set the env vars

Set these in the env block of a Claude Code settings file (~/.claude/settings.json for every project, or .claude/settings.json for one), then restart the session.

{
  "env": {
    "BITBUCKET_WORKSPACE": "my-workspace",
    "BITBUCKET_REPO": "my-repo",
    "BITBUCKET_USERNAME": "me@example.com",
    "BITBUCKET_API_TOKEN": "…"
  }
}

Variable

Required

Default

Purpose

BITBUCKET_WORKSPACE

yes

Workspace slug

BITBUCKET_REPO

yes

Repository slug

BITBUCKET_USERNAME

yes

Atlassian account email

BITBUCKET_API_TOKEN

yes

Token from step 2

BITBUCKET_READ_ONLY

no

false

Expose read-only tools only

BITBUCKET_ENABLE_PULL_REQUESTS

no

true

Toggle pull request tools

BITBUCKET_ENABLE_PIPELINES

no

true

Toggle pipeline tools

Related MCP server: Bitbucket MCP Server

Development

  • Run the test suite with uv run pytest.

  • Build a wheel with uv build.

  • Publish with uv publish.

One server instance targets one workspace and repository, selected by the env vars above.

Available Tools

26 tools
approve_pull_requestD

Approve a pull request.

Inputs: pull_request_id (required). Returns: result

create_inline_pull_request_commentC

Add an inline comment to a pull request.

Inputs: line (required), path (required), text (required), pull_request_id (required), +1 more. Returns: id, line, path, text, +2 more

create_pull_requestC

Open a pull request.

Inputs: title (required), source_branch (required), description, destination_branch, +1 more. Returns: id, state, title, author, +8 more

create_pull_request_commentC

Add a comment to a pull request.

Inputs: text (required), pull_request_id (required), pending. Returns: id, line, path, text, +2 more

decline_pull_requestC

Decline a pull request.

Inputs: pull_request_id (required). Returns: result

delete_pull_request_commentC

Delete a pull request comment.

Inputs: comment_id (required), pull_request_id (required). Returns: result

diagnose_pipeline_failureA

Get a failed pipeline's failed steps.

Inputs: pipeline_id (required). Returns: pipeline, failed_steps

edit_pull_request_commentC

Edit a pull request comment.

Inputs: text (required), comment_id (required), pull_request_id (required). Returns: id, line, path, text, +2 more

get_open_pull_requestsA

List open pull requests.

Inputs: no named parameters. Returns: result

get_pipelineC

Get a pipeline run.

Inputs: pipeline_id (required). Returns: uuid, state, result, ref_name, +2 more

get_pipelinesA

List recent pipeline runs.

Inputs: no named parameters. Returns: result

get_pipeline_step_logC

Get the log for a pipeline step.

Inputs: step_uuid (required), pipeline_id (required). Returns: result

get_pipeline_stepsC

Get a pipeline's steps.

Inputs: pipeline_id (required). Returns: result

get_pull_requestC

Get a pull request's details.

Inputs: pull_request_id (required). Returns: id, state, title, author, +8 more

get_pull_request_commentsC

Get a pull request's comments.

Inputs: pull_request_id (required). Returns: result

get_pull_request_commitsB

Get a pull request's commits.

Inputs: pull_request_id (required). Returns: result

get_pull_request_diffB

Get a pull request's diff.

Inputs: pull_request_id (required). Returns: result

get_pull_request_statusesB

Get a pull request's build statuses.

Inputs: pull_request_id (required). Returns: result

merge_pull_requestC

Merge a pull request.

Inputs: pull_request_id (required), message, merge_strategy, close_source_branch. Returns: result

reopen_pull_request_commentB

Reopen a pull request comment thread.

Inputs: comment_id (required), pull_request_id (required). Returns: result

reply_to_pull_request_commentC

Reply to a pull request comment.

Inputs: text (required), reply_to (required), pull_request_id (required), pending. Returns: id, line, path, text, +2 more

request_pull_request_changesC

Request changes on a pull request.

Inputs: pull_request_id (required). Returns: result

resolve_pull_request_commentC

Resolve a pull request comment thread.

Inputs: comment_id (required), pull_request_id (required). Returns: result

unapprove_pull_requestC

Remove your approval from a pull request.

Inputs: pull_request_id (required). Returns: result

update_pull_requestD

Update a pull request.

Inputs: pull_request_id (required), title, description. Returns: id, state, title, author, +8 more

withdraw_pull_request_changesB

Withdraw your changes request on a pull request.

Inputs: pull_request_id (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 26 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action. Pull request tools are clearly separated by operation (get, create, update, merge, approve, etc.) and by scope (list vs detail, comments vs inline comments vs replies). Pipeline tools are similarly distinct for runs, steps, and logs.

    Naming Consistency5/5

    Tool names consistently follow a verb_noun pattern (e.g., get_pull_request, create_pull_request_comment, get_pipeline_steps). Even the slightly longer names like request_pull_request_changes or diagnose_pipeline_failure remain readable and align with the pattern.

    Tool Count4/5

    26 tools is slightly above the typical 3-15 range, but the scope intentionally covers both pull request management (21 tools) and pipeline inspection (5 tools). Each tool serves a distinct, non-redundant purpose, making the count justified rather than bloated.

    Completeness4/5

    The pull request lifecycle is well covered: create, update, merge, decline, approve, request changes, comments, diffs, commits, and statuses. Pipelines cover listing, getting details, steps, logs, and failure diagnosis. Minor gaps exist (e.g., no general list of PRs filtered by state, no pipeline triggering), but they are non-critical for most workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      An MCP server that provides tools for interacting with the Bitbucket API, supporting both Bitbucket Cloud and Bitbucket Server, enabling pull request, branch, file, code review, and search operations.
      19
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      An MCP server for Bitbucket Cloud that enables managing pull requests, branches, and repositories in natural language from any MCP-capable client.
      23
      542 npm
      4
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP server for Bitbucket Cloud that enables reviewing, managing, and merging pull requests, assigning reviewers by name, reading files at a ref, and inspecting pipeline status from any MCP client.
      14
      MIT