← Back to directory
B

Bitbucket MCP Server

Community
A Model Context Protocol (MCP) server for Bitbucket Cloud and Server API integration.
Category
Dev Tools #227 of 438
Stars
★ 166 Popular
Transport
stdio (local process)
Runtime
Node.js 18+
Credentials
API key / credential required
License
MIT
Last commit
Tools
40
52FMRS · D

bitbucket-mcp is a feature-rich MCP server for Bitbucket Cloud and Server integration, offering a wide range of repository, pull request, and pipeline operations. It emphasizes safety by disabling delete tools by default and includes code scanning. Installation is straightforward with clear environment variable configuration, and it supports Cursor among other clients.

Strongest · Setup experience 14/20 Weakest · Reliability 4/20

Reliability
4/20
Security and permissions
10/20
Maintenance
10/20
Documentation
14/20
Setup experience
14/20
Why each score
Reliability 4/20
Only the README and server manifest were supplied; no source code, tests, or CI workflows were available. It is impossible to verify clean startup, the MCP init/tool-list handshake, or whether declared tools match real behavior. Following static calibration, absence of executable evidence forces a conservative score of 4.
Security and permissions 10/20
The README claims no DELETE operations, dangerous tools disabled by default via BITBUCKET_ENABLE_DANGEROUS, and credentials passed via environment variables. Installation examples use placeholders, so no real secrets are leaked. However, credential handling, log redaction, network egress scope, and confirmation of dangerous operations cannot be verified from source; data-flow disclosure is also incomplete, so the score is capped at 10.
Maintenance 10/20
The repository is not archived, has an MIT license, version 5.0.5, and badges for CodeQL and npm, suggesting ongoing releases. Still, there is no direct evidence of commit frequency, release dates, or issue responsiveness, so sustained maintenance cannot be fully confirmed; a middle-ground score of 10 is appropriate.
Documentation 14/20
The README is extensive: installation steps, environment variable table, tool parameters, pagination controls, auth troubleshooting, Cursor integration JSON, and local-build examples are all present. Deductions are made for repeated pagination blocks, minor typos such as 'Checkout out', and missing disclosure of costs, rate limits, and deeper failure modes; final score is 14.
Setup experience 14/20
Both npx and npm global/project install options are documented, the environment variable table is clear, and client configuration examples for Cursor plus a local build path are provided. The setup is short and actionable. However, no executable CI test or run log proves the end-to-end install always works, so per static calibration the maximum is 15; with no major flaw, a score of 14 is given.

Static review · not runListed 2026-08-07

Read the FMRS scoring method →

Fit and risk

What it can accessUses the network

Best for

  • Developers using Bitbucket Cloud or Server who want AI assistant integration.
  • Teams that need to interact with Bitbucket repos and PRs programmatically or via natural language.
  • Users leveraging MCP standard to operate Bitbucket within tools like Cursor.

Not for

  • Users who need delete operations on Bitbucket resources (delete tools are disabled by default).
  • Users who need a GUI instead of CLI or AI integration.
  • Users without Bitbucket credentials.

Required permissions

  • Requires Bitbucket app password or access token.
  • Needs at least 'Repositories: Read' for most operations.
  • For pipeline operations, 'Pipelines: Read' is required.
  • For write operations (e.g., create/update PRs), 'Pull requests: Write' is required.

Risks and side effects

  • Using app passwords or tokens may lead to unauthorized access if leaked.
  • Overly permissive credentials might allow unintended modifications or deletions (though delete tools are disabled by default).
  • Misconfiguration could expose sensitive information (e.g., incorrect logging levels).

Setup

Before you start

Runtime:Node.js 18+

BITBUCKET_USERNAME required Your Bitbucket username, usually your email; required together with BITBUCKET_PASSWORD unless BITBUCKET_TOKEN is used.
BITBUCKET_PASSWORD requiredsecret A Bitbucket app password created under Personal Settings > App Passwords with Repositories: Read, Pull requests: Read/Write, and Pipelines: Read permissions.
BITBUCKET_TOKEN optionalsecret A Bitbucket access token that can be used instead of username/password authentication.
Other optional settings (7)
BITBUCKET_URL optional Bitbucket API base URL, defaults to https://api.bitbucket.org/2.0; a web URL with the workspace also works and the workspace is auto-extracted.
BITBUCKET_WORKSPACE optional Default workspace name; optional if the workspace is embedded in BITBUCKET_URL.
BITBUCKET_ENABLE_DANGEROUS optional Set to true to enable dangerous tools such as deletions; disabled by default.
BITBUCKET_LOG_DISABLE optional Set to true or 1 to disable file logging.
BITBUCKET_LOG_FILE optional Absolute path to a specific log file.
BITBUCKET_LOG_DIR optional Directory for storing logs; defaults to the OS-specific app log directory.
BITBUCKET_LOG_PER_CWD optional Set to true to nest logs under a per-working-directory subfolder.
  1. Ensure Node.js 18 or higher.
  2. Recommended: use npx with environment variables (BITBUCKET_URL, BITBUCKET_USERNAME, BITBUCKET_PASSWORD, optionally BITBUCKET_WORKSPACE) and run npx -y bitbucket-mcp@latest.
  3. Alternatively, install globally: npm install -g bitbucket-mcp and run bitbucket-mcp.
  4. In a supported client like Cursor, add an MCP configuration with the npx command and required env vars.
.cursor/mcp.json
{
  "mcpServers": {
    "bitbucket": {
      "command": "npx",
      "args": [
        "-y",
        "bitbucket-mcp@latest"
      ],
      "env": {
        "BITBUCKET_URL": "https://api.bitbucket.org/2.0",
        "BITBUCKET_WORKSPACE": "your-workspace",
        "BITBUCKET_USERNAME": "your-username",
        "BITBUCKET_PASSWORD": "your-app-password"
      }
    }
  }
}

Shown for Cursor. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "bitbucket": {
      "command": "npx",
      "args": [
        "-y",
        "bitbucket-mcp@latest"
      ],
      "env": {
        "BITBUCKET_URL": "https://api.bitbucket.org/2.0",
        "BITBUCKET_WORKSPACE": "your-workspace",
        "BITBUCKET_USERNAME": "your-username",
        "BITBUCKET_PASSWORD": "your-app-password"
      }
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add bitbucket -e BITBUCKET_URL=https://api.bitbucket.org/2.0 -e BITBUCKET_WORKSPACE=your-workspace -e BITBUCKET_USERNAME=your-username -e BITBUCKET_PASSWORD=your-app-password -- npx -y bitbucket-mcp@latest

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After connecting, check the client's tool list for tools like listRepositories, getPullRequests, and runPipeline; calling listRepositories and getting back your workspace's repositories confirms authentication and connection work.

Troubleshooting

  1. 401 authentication errors: ensure you are using an app password, not your regular password, and check permissions.
  2. Use API URL format: if you get 401, try setting `BITBUCKET_URL=https://api.bitbucket.org/2.0`.
  3. Test API access with curl: `curl -u "username:app-password" "https://api.bitbucket.org/2.0/repositories/workspace"`.
  4. For Atlassian API keys, put the key in `BITBUCKET_PASSWORD` and use your Bitbucket email as username.

Things to try

Once connected, you can ask your AI assistant things like:

  • List all repositories in my workspace
  • Show all open pull requests in the repo my-repo
  • Get the diff for pull request #42 and add an inline comment on the buggy line
  • Trigger a pipeline run for repo my-repo and then show the logs of its steps

Tools 40

listRepositories read-only
Lists repositories in a workspace, with optional name filter and pagination.
getRepository read-only
Gets details for a specific repository.
getPullRequests read-only
Gets pull requests for a repository, optionally filtered by state.
createPullRequest writes
Creates a new pull request with source/target branches, reviewers, and draft option.
getPullRequest read-only
Gets details for a specific pull request.
updatePullRequest writes
Updates a pull request (title, description, etc.).
getPullRequestActivity read-only
Gets the activity log for a pull request.
approvePullRequest writes
Approves a pull request.
Show 32 more tools
unapprovePullRequest writes
Removes approval from a pull request.
declinePullRequest writes
Declines a pull request, optionally with a reason.
mergePullRequest writes
Merges a pull request with optional merge strategy and message.
requestChanges writes
Requests changes on a pull request.
removeChangeRequest writes
Removes a change request from a pull request.
createDraftPullRequest writes
Creates a draft pull request.
publishDraftPullRequest writes
Publishes a draft pull request to make it ready for review.
convertTodraft writes
Converts a regular pull request to draft status.
getPullRequestComments read-only
Lists comments on a pull request.
addPullRequestComment writes
Adds a comment to a pull request, either general or inline.
getPullRequestComment read-only
Gets a specific pull request comment.
updatePullRequestComment writes
Updates a pull request comment.
deletePullRequestComment destructive
Deletes a pull request comment.
resolveComment writes
Resolves a comment thread on a pull request.
reopenComment writes
Reopens a resolved comment thread.
getPullRequestDiff read-only
Gets the diff for a pull request.
getPullRequestDiffStat read-only
Gets diff statistics for a pull request.
getPullRequestPatch read-only
Gets the patch for a pull request.
getPullRequestTasks read-only
Lists tasks on a pull request.
createPullRequestTask writes
Creates a task on a pull request.
getPullRequestTask read-only
Gets a specific task on a pull request.
updatePullRequestTask writes
Updates a task's content or state.
deletePullRequestTask destructive
Deletes a task.
getPullRequestCommits read-only
Lists commits on a pull request.
getPullRequestStatuses read-only
Lists commit statuses for a pull request.
listPipelineRuns read-only
Lists pipeline runs for a repository, with optional filters.
getPipelineRun read-only
Gets details for a specific pipeline run.
runPipeline writes
Triggers a new pipeline run.
stopPipeline writes
Stops a running pipeline.
getPipelineSteps read-only
Lists steps for a pipeline run.
getPipelineStep read-only
Gets details for a specific pipeline step.
getPipelineStepLogs read-only
Gets logs for a specific pipeline step.

Use cases

Manage Bitbucket repositories and pull requests via AI assistants: list repos, view PRs, create PRs, review and merge.
Automate workflows, such as triggering actions based on PR activity or running pipelines.
Get repository info, PR comments, and diffs in a conversational interface.

Supported clients

Cursor
Claude Desktop

Listed from the project's documentation, not tested by this site.

Overview

bitbucket-mcp is a Model Context Protocol (MCP) server that integrates AI assistants like Cursor with Bitbucket repositories, pull requests, and pipelines. It provides tools to list and retrieve repositories, manage pull requests (create, update, approve, merge, etc.), handle pull request comments, tasks, diffs, and pipelines. The server uses stdio transport and relies on environment variables for authentication.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 62.9k · Tools 2 Compare with this →

Source revision d3594e2cfaae Data synced 2026-10-12 Read the FMRS scoring method