Bitbucket MCP Server

MCP server for Bitbucket Server / Data Center with code review, cross-repo PRs, and CI insights

Local serverstdio

What is the Bitbucket MCP server?

Bitbucket MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. MCP server for Bitbucket Server / Data Center with code review, cross-repo PRs, and CI insights.

What you get

What the assistant can call

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

  • Repositories — The Repositories tool exposed by this server
  • Forks — The Forks tool exposed by this server
  • Users — The Users tool exposed by this server
  • Labels — The Labels tool exposed by this server
  • Webhooks — The Webhooks tool exposed by this server
  • Keys — The Keys tool exposed by this server
  • Prompts — The Prompts tool exposed by this server
  • Resources — The Resources tool exposed by this server
  • Caching — The server caches frequently accessed data in memory (project lists, repository metadata, default reviewers) to reduce API calls. The cache uses LRU

Setting it up

The server ships on npm as @pavel-kalmykov/bitbucket-server-mcp, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

Configuration and credentials

You will need 2 environment variables: BITBUCKET_URL, 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.

  • Bitbucket Server / Data Center 7.21+ (the E2E suite covers 7.21, 8.5, 8.9, 8.19, 9.4 and 10.2). - One of: - Node.js >= 22.14 (via npx) - Bun (via bunx) - Docker

Choosing this one

Plenty of knowledge and memory servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Bitbucket's toolset — Repositories, Forks, Users and 6 more — is a fair guide to whether it matches your workflow. It is maintained by GitHub Actions; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

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 9 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
RepositoriesThe Repositories tool exposed by this server.
ForksThe Forks tool exposed by this server.
UsersThe Users tool exposed by this server.
LabelsThe Labels tool exposed by this server.
WebhooksThe Webhooks tool exposed by this server.
KeysThe Keys tool exposed by this server.
PromptsThe Prompts tool exposed by this server.
ResourcesThe Resources tool exposed by this server.
CachingThe server caches frequently accessed data in memory (project lists, repository metadata, default reviewers) to reduce API calls. The cache uses LRU eviction (max 500 entries) so memory stays bounded, and write operation

How to install the Bitbucket MCP server

{
  "mcpServers": {
    "bitbucket-server-1": {
      "command": "npx",
      "args": ["-y", "@pavel-kalmykov/bitbucket-server-mcp"],
      "env": {
        "BITBUCKET_URL": "your-value",
        "BITBUCKET_TOKEN": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Bitbucket Server / Data Center 7.21+ (the E2E suite covers 7.21, 8.5, 8.9, 8.19, 9.4 and 10.2). - One of: - Node.js >= 22.14 (via npx) - Bun (via bunx) - Docker
VariableDescriptionRequired
BITBUCKET_URLEndpoint or connection string the server talks to.Yes
BITBUCKET_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use Bitbucket to Repositories.
  • Use Bitbucket to Forks.
  • Use Bitbucket to Users.

Frequently asked questions

It connects Bitbucket to MCP-compatible AI assistants such as Claude and Cursor, exposing 9 tools (Repositories, Forks, Users, 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.