Bitbucket MCP Server

Model Context Protocol (MCP) server for Bitbucket Cloud and Server API integration

Local serverstdioGo

What is the Bitbucket MCP server?

Bitbucket MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. Model Context Protocol (MCP) server for Bitbucket Cloud and Server API integration.

What you get

A Model Context Protocol (MCP) server for integrating with Bitbucket Cloud and Server APIs. This MCP server enables AI assistants like Cursor to interact with your Bitbucket repositories, pull requests, and other resources.

Checkout out the official npm package This server implements the Model Context Protocol standard to provide AI assistants with access to Bitbucket data and operations. It includes tools for:

What the assistant can call

Once Bitbucket is connected, these are the calls the assistant has available:

  • Pagination — Unless noted otherwise, listing tools accept the following optional parameters:
  • listRepositories — The listRepositories tool exposed by this server
  • getRepository — The getRepository tool exposed by this server
  • getPullRequests — The getPullRequests tool exposed by this server
  • createPullRequest — The createPullRequest tool exposed by this server
  • getPullRequest — The getPullRequest tool exposed by this server
  • updatePullRequest — The updatePullRequest tool exposed by this server
  • getPullRequestActivity — The getPullRequestActivity tool exposed by this server
  • approvePullRequest — The approvePullRequest tool exposed by this server
  • unapprovePullRequest — The unapprovePullRequest tool exposed by this server
  • declinePullRequest — The declinePullRequest tool exposed by this server
  • mergePullRequest — The mergePullRequest tool exposed by this server

Configuration and credentials

You will need 5 environment variables: BITBUCKET_URL, BITBUCKET_WORKSPACE, BITBUCKET_USERNAME, BITBUCKET_PASSWORD, BITBUCKET_TOKEN. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Node.js 18 or higher - npm or yarn

Setting it up

bitbucket-mcp on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Choosing this one

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Bitbucket's toolset — Pagination, listRepositories, getRepository and 11 more — is a fair guide to whether it matches your workflow. It is maintained by yeminimatan; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Bitbucket.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the bitbucket mcp server does with a few real requests.

Available tools

ToolWhat it does
PaginationUnless noted otherwise, listing tools accept the following optional parameters:
listRepositoriesThe listRepositories tool exposed by this server.
getRepositoryThe getRepository tool exposed by this server.
getPullRequestsThe getPullRequests tool exposed by this server.
createPullRequestThe createPullRequest tool exposed by this server.
getPullRequestThe getPullRequest tool exposed by this server.
updatePullRequestThe updatePullRequest tool exposed by this server.
getPullRequestActivityThe getPullRequestActivity tool exposed by this server.
approvePullRequestThe approvePullRequest tool exposed by this server.
unapprovePullRequestThe unapprovePullRequest tool exposed by this server.
declinePullRequestThe declinePullRequest tool exposed by this server.
mergePullRequestThe mergePullRequest tool exposed by this server.
requestChangesThe requestChanges tool exposed by this server.
removeChangeRequestThe removeChangeRequest tool exposed by this server.

How to install the Bitbucket MCP server

{
  "mcpServers": {
    "bitbucket-1": {
      "command": "npx",
      "args": ["-y", "bitbucket-mcp"],
      "env": {
        "BITBUCKET_URL": "your-value",
        "BITBUCKET_WORKSPACE": "your-value",
        "BITBUCKET_USERNAME": "your-value",
        "BITBUCKET_PASSWORD": "your-value",
        "BITBUCKET_TOKEN": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Node.js 18 or higher - npm or yarn
VariableDescriptionRequired
BITBUCKET_URLEndpoint or connection string the server talks to.Yes
BITBUCKET_WORKSPACEConfiguration value read at startup.Optional
BITBUCKET_USERNAMEConfiguration value read at startup.Optional
BITBUCKET_PASSWORDConfiguration value read at startup.Optional
BITBUCKET_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use Bitbucket to Pagination.
  • Use Bitbucket to listRepositories.
  • Use Bitbucket to getRepository.

Frequently asked questions

It connects Bitbucket to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (Pagination, listRepositories, getRepository, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Bitbucket directly.