Bitbucket MCP server

CommunityMatanYemini143Config last verified Jun 1, 2026

A maintained MCP server for Bitbucket Cloud and Server: browse repos, drive pull requests, comments, tasks, and pipelines.

Bitbucket MCP is a widely used, actively maintained Model Context Protocol server that connects an agent to Atlassian Bitbucket Cloud and Server/Data Center. It lets a coding assistant work the way a developer does on Bitbucket: list and inspect repositories, read and create pull requests, manage the review lifecycle (approve, request changes, decline, merge), thread comments inline or generally, resolve and reopen comment threads, track PR tasks, read diffs and patches, and drive Bitbucket Pipelines runs and step logs.

The server is published to npm as bitbucket-mcp and runs locally over stdio via npx, authenticating with either a Bitbucket app password (BITBUCKET_USERNAME plus BITBUCKET_PASSWORD) or a BITBUCKET_TOKEN access token, and an optional default BITBUCKET_WORKSPACE. By design it is safety-conscious: destructive operations are gated behind an explicit BITBUCKET_ENABLE_DANGEROUS flag, so an agent can browse, review, and comment freely without risking data loss. Listing tools support pagination so an assistant can page through large collections without truncation. For teams on Bitbucket, it brings the same review-and-CI loop that the GitHub and GitLab servers provide for their platforms.

Quick install

Copy-paste configs are provided for all 8 supported clients. Pick your client below.

Add to ~/.claude.json

~/.claude.json
json
{
  "mcpServers": {
    "bitbucket": {
      "command": "npx",
      "args": [
        "-y",
        "bitbucket-mcp@latest"
      ],
      "env": {
        "BITBUCKET_URL": "<BITBUCKET_URL>",
        "BITBUCKET_USERNAME": "<BITBUCKET_USERNAME>",
        "BITBUCKET_PASSWORD": "<BITBUCKET_PASSWORD>",
        "BITBUCKET_TOKEN": "<BITBUCKET_TOKEN>",
        "BITBUCKET_WORKSPACE": "<BITBUCKET_WORKSPACE>",
        "BITBUCKET_ENABLE_DANGEROUS": "<BITBUCKET_ENABLE_DANGEROUS>"
      }
    }
  }
}
Or via CLI
bash
claude mcp add bitbucket -- npx -y bitbucket-mcp@latest

Available tools

ToolDescription
listRepositoriesLists repositories in a workspace, with optional name filtering and pagination.
getRepositoryGets details for a specific repository.
getPullRequestsGets pull requests for a repository, optionally filtered by state (OPEN, MERGED, DECLINED, SUPERSEDED).
createPullRequestCreates a new pull request.
getPullRequestGets details for a specific pull request.
updatePullRequestUpdates a pull request.
getPullRequestActivityGets the activity log for a pull request.
approvePullRequestApproves a pull request.
unapprovePullRequestRemoves an approval from a pull request.
declinePullRequestDeclines a pull request.
mergePullRequestMerges a pull request.
requestChangesRequests changes on a pull request.
removeChangeRequestRemoves a change request from a pull request.
createDraftPullRequestCreates a new draft pull request.
publishDraftPullRequestPublishes a draft pull request to make it ready for review.
convertTodraftConverts a regular pull request to draft status.
getPullRequestCommentsLists comments on a pull request.
addPullRequestCommentCreates a comment on a pull request, general or inline.
getPullRequestCommentGets a specific comment on a pull request.
updatePullRequestCommentUpdates a comment on a pull request.
deletePullRequestCommentDeletes a comment on a pull request.
resolveCommentResolves a comment thread on a pull request.
reopenCommentReopens a resolved comment thread on a pull request.
getPullRequestDiffGets the diff for a pull request.
getPullRequestDiffStatGets the diff statistics for a pull request.
getPullRequestPatchGets the patch for a pull request.
getPullRequestTasksLists tasks on a pull request.
createPullRequestTaskCreates a task on a pull request.
getPullRequestTaskGets a specific task on a pull request.
updatePullRequestTaskUpdates a task on a pull request.
deletePullRequestTaskDeletes a task on a pull request.
getPullRequestCommitsLists commits on a pull request.
getPullRequestStatusesLists commit statuses for a pull request.
listPipelineRunsLists pipeline runs for a repository.
getPipelineRunGets details for a specific pipeline run.
runPipelineTriggers a new pipeline run.
stopPipelineStops a running pipeline.
getPipelineStepsLists steps for a pipeline run.
getPipelineStepGets details for a specific pipeline step.
getPipelineStepLogsGets logs for a specific pipeline step.

Required configuration

  • BITBUCKET_URLOptional

    Bitbucket API base URL. Defaults to https://api.bitbucket.org/2.0 for Cloud; point it at your Server/Data Center host otherwise.

  • BITBUCKET_USERNAMEOptional

    Your Bitbucket username (often your account email). Required when using app-password auth.

  • BITBUCKET_PASSWORDOptional

    Your Bitbucket app password. Required when using app-password auth.

  • BITBUCKET_TOKENOptional

    A Bitbucket access token, used as an alternative to username + app password.

  • BITBUCKET_WORKSPACEOptional

    Default workspace slug. Auto-extracted if BITBUCKET_URL already contains it.

  • BITBUCKET_ENABLE_DANGEROUSOptional

    Set to true to enable destructive tools such as deletions. Disabled by default.

What you can do with it

Review and merge a pull request

An agent reads a PR's diff and activity, leaves inline comments, approves or requests changes, and merges once the checks pass, all without leaving the editor.

Investigate a failing pipeline

Using listPipelineRuns and getPipelineStepLogs, the agent finds which Bitbucket Pipelines step failed, reads its logs, and summarizes the cause before retriggering the run.

FAQ

Is it free?
Yes. The server is free and open source under the MIT license; you only need a Bitbucket account and an app password or access token scoped to what the agent should do.
Does it support remote/OAuth?
No. It runs locally over stdio via npx -y bitbucket-mcp@latest and authenticates with a Bitbucket app password (username + password) or a BITBUCKET_TOKEN access token.
Can it delete things or break my repo?
Not by default. Destructive operations are gated behind the BITBUCKET_ENABLE_DANGEROUS flag, so an agent can browse, review, comment, and run pipelines without risk of data loss unless you explicitly opt in.
← Browse all version-control servers