Skip to content
MCP server

Bitbucket MCP

MCP server for Bitbucket Cloud pull requests and Pipelines build diagnosis

Runs locally
Install
Pricing
Open source
Platforms
CLI, macOS, Windows
Runs
Locally
Version
1.4.0
Listing updated
today

Similar MCP servers

About Bitbucket MCP

Bitbucket MCP is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

The README describes this as a self-owned Model Context Protocol server for Bitbucket Cloud, covering a pull request from listing and diffing through review comments, tasks, approvals, merge checks and merging. It also includes a set of read-only Pipelines tools for finding the failing step and the log line behind a red build, plus Code Insights lookups.

The project is written in C# on .NET 10 and ships as a Native AOT binary per platform, or as a NuGet tool launched with dnx. Authentication can use an OAuth consumer with a browser login, an Atlassian API token, or a workspace, project or repository access token, and the README lists the scopes each one needs. Bitbucket Data Center is stated to be out of scope.

It suits developers and teams who want an AI client to review and act on Bitbucket pull requests while keeping the server's dependencies small and auditable. The README says the project is MIT licensed.

Install

Run in a terminal

claude mcp add bitbucket-mcp --env BITBUCKET_OAUTH_SECRET='<BITBUCKET_OAUTH_SECRET>' --env BITBUCKET_ACCESS_TOKEN='<BITBUCKET_ACCESS_TOKEN>' --env BITBUCKET_API_TOKEN='<BITBUCKET_API_TOKEN>' -- dnx bitbucket-mcp --yes

Add to claude_desktop_config.json

{
  "mcpServers": {
    "bitbucket-mcp": {
      "command": "dnx",
      "args": [
        "bitbucket-mcp",
        "--yes"
      ],
      "env": {
        "BITBUCKET_OAUTH_SECRET": "<BITBUCKET_OAUTH_SECRET>",
        "BITBUCKET_ACCESS_TOKEN": "<BITBUCKET_ACCESS_TOKEN>",
        "BITBUCKET_API_TOKEN": "<BITBUCKET_API_TOKEN>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "bitbucket-mcp": {
      "command": "dnx",
      "args": [
        "bitbucket-mcp",
        "--yes"
      ],
      "env": {
        "BITBUCKET_OAUTH_SECRET": "<BITBUCKET_OAUTH_SECRET>",
        "BITBUCKET_ACCESS_TOKEN": "<BITBUCKET_ACCESS_TOKEN>",
        "BITBUCKET_API_TOKEN": "<BITBUCKET_API_TOKEN>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "bitbucket-mcp": {
      "type": "stdio",
      "command": "dnx",
      "args": [
        "bitbucket-mcp",
        "--yes"
      ],
      "env": {
        "BITBUCKET_OAUTH_SECRET": "<BITBUCKET_OAUTH_SECRET>",
        "BITBUCKET_ACCESS_TOKEN": "<BITBUCKET_ACCESS_TOKEN>",
        "BITBUCKET_API_TOKEN": "<BITBUCKET_API_TOKEN>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "bitbucket-mcp": {
      "command": "dnx",
      "args": [
        "bitbucket-mcp",
        "--yes"
      ],
      "env": {
        "BITBUCKET_OAUTH_SECRET": "<BITBUCKET_OAUTH_SECRET>",
        "BITBUCKET_ACCESS_TOKEN": "<BITBUCKET_ACCESS_TOKEN>",
        "BITBUCKET_API_TOKEN": "<BITBUCKET_API_TOKEN>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "bitbucket-mcp": {
      "command": "dnx",
      "args": [
        "bitbucket-mcp",
        "--yes"
      ],
      "env": {
        "BITBUCKET_OAUTH_SECRET": "<BITBUCKET_OAUTH_SECRET>",
        "BITBUCKET_ACCESS_TOKEN": "<BITBUCKET_ACCESS_TOKEN>",
        "BITBUCKET_API_TOKEN": "<BITBUCKET_API_TOKEN>"
      }
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • BITBUCKET_OAUTH_KEYOAuth consumer key of your own Bitbucket Cloud OAuth consumer. Together with BITBUCKET_OAUTH_SECRET this enables the browser login flow.
  • BITBUCKET_OAUTH_SECRETOAuth consumer secret matching BITBUCKET_OAUTH_KEY.
  • BITBUCKET_ACCESS_TOKENBitbucket Cloud access token sent as a Bearer credential. Takes precedence over every other credential and skips the OAuth flow.
  • BITBUCKET_EMAILAtlassian account e-mail, used with BITBUCKET_API_TOKEN as Basic credentials.
  • BITBUCKET_API_TOKENAtlassian API token, used with BITBUCKET_EMAIL as Basic credentials.
  • BITBUCKET_DEFAULT_WORKSPACEWorkspace slug used when a tool call omits the workspace argument.

Tools this server provides (22)

Taken from the project documentation; the running server may differ.

listPullRequests
Lists a repository's pull requests, most recently updated first.
getPullRequest
Reads one pull request in full, including reviewers and approvals.
getPullRequestDiff
Fetches changed files or the unified diff for named paths.
getPullRequestComments
Lists general and inline comments on a pull request.
listDefaultReviewers
Lists the repository's effective default reviewers with account UUIDs.
listPullRequestStatuses
Lists build statuses reported against a pull request.
listPullRequestTasks
Lists a pull request's tasks by resolved state.
getPullRequestMergeability
Runs Bitbucket's dry-run merge check, including merge checks and queue state.
createPullRequest
Opens a new pull request.
updatePullRequest
Changes a pull request's title, description, destination, reviewers or flags.
addPullRequestComment
Posts a general, reply or inline comment on a pull request.
updatePullRequestComment
Edits or deletes one of the authenticated user's own comments.
resolvePullRequestComment
Resolves or reopens a comment thread.
addPullRequestTask
Adds a task to a pull request, optionally tied to a comment.
updatePullRequestTask
Resolves, reopens or rewrites a pull request task.
setPullRequestReviewStatus
Sets the user's own approval or change-request status.
mergePullRequest
Merges a pull request, with optional strategy, waiting up to 25 seconds.
declinePullRequest
Declines a pull request without merging.
listPipelines
Lists pipeline runs, filterable by branch, commit or state.
getPipeline
Reads one pipeline run with its steps and error messages.
getPipelineStepLog
Reads the end of a step's log or lines matching a pattern.
listCodeInsights
Lists Code Insights reports and findings for a commit.

What it does

Pull request lifecycle tools
Lists, reads, diffs, comments on, edits, creates, approves, merges and declines pull requests in Bitbucket Cloud.
Merge readiness check
Runs Bitbucket's own dry run to show conflicts, required checks, tasks and merge queue state before merging.
Pipeline failure diagnosis
Reads pipeline runs, failed steps, error messages and step logs to explain why a build went red.
Capped diffs
Lists changed files first and fetches diff content only for named paths, with truncation marked in the output.
Multiple credential options
Supports OAuth browser login, Atlassian API tokens and access tokens, with documented precedence between them.
Native AOT binaries
Ships self-contained executables per platform, which the README says start in about ten milliseconds.

Good for

  • Reviewing a Bitbucket pull request with an AI assistant, including inline comments and tasks
  • Checking whether a pull request is blocked by approvals, builds or unresolved tasks before merging
  • Finding the failing step and log line of a red Bitbucket Pipelines run
  • Triaging which open pull requests are waiting on a particular reviewer
  • Opening pull requests with a source branch and default reviewers

Pricing

Open source

MIT-licensed open source; self-hosted by running the binary or NuGet tool.

Bitbucket MCP FAQ

Does it work with Bitbucket Data Center?

No. The README states Bitbucket Data Center is explicitly out of scope.

What license is it under?

The README says the project is MIT licensed.

Can it run pipelines or stop builds?

No. The README says the four pipeline tools are read-only by design, and running or stopping a build is not offered.

Which credentials does it accept?

It accepts BITBUCKET_ACCESS_TOKEN, an Atlassian email with API token, or an OAuth consumer key and secret, in that precedence order.

Is Bitbucket MCP free?

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

How do I add Bitbucket MCP to Claude Code?

Run this command in your terminal: claude mcp add bitbucket-mcp --env BITBUCKET_OAUTH_SECRET='<BITBUCKET_OAUTH_SECRET>' --env BITBUCKET_ACCESS_TOKEN='<BITBUCKET_ACCESS_TOKEN>' --env BITBUCKET_API_TOKEN='<BITBUCKET_API_TOKEN>' -- dnx bitbucket-mcp --yes

What are the best alternatives to Bitbucket MCP?

The closest alternatives to Bitbucket MCP are Git MCP Server, Sonarqube MCP, GitHub, Bitpull and Azure DevOps.

Where this comes from

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

How AIPoweredBot checks servers