Bitbucket Server MCP

v1.0.0Version Controlstable

Facilitates interaction with Bitbucket Server for pull request management using the MCP protocol, supporting operations such as creating, merging, commenting, and reviewing pull requests.

bitbucket-server-mcpmcpai-integration
Share:
62
Stars
0
Downloads
0
Weekly
0/5

What is Bitbucket Server MCP?

Bitbucket Server MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to facilitates interaction with bitbucket server for pull request management using the mcp protocol, supporting operations such as creating, merging, commenting, and reviewing pull requests.

Facilitates interaction with Bitbucket Server for pull request management using the MCP protocol, supporting operations such as creating, merging, commenting, and reviewing pull requests.

This server falls under the Version Control category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Facilitates interaction with Bitbucket Server for pull reque

Use Cases

Create, merge, and review pull requests on Bitbucket Server via AI.
Manage code comments and pull request workflows automatically.
Integrate Bitbucket repository management into AI assistants.
garc33

Maintainer

LicenseApache 2.0
Languagejavascript
Versionv1.0.0
UpdatedApr 30, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx bitbucket-server-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Bitbucket Server MCP

Bitbucket Server MCP is a JavaScript-based Model Context Protocol server that provides a comprehensive interface to Bitbucket Server (self-hosted) and Bitbucket Data Center instances, exposing over 30 tools for pull request management, code review, repository browsing, and team collaboration. It supports flexible authentication via personal access tokens or username/password, cross-repository PR dashboards, code search with project filtering, and a read-only deployment mode for safe inspection workflows. Development teams using self-hosted Bitbucket can integrate PR reviews, approvals, merges, and code comments directly into their AI assistant workflows.

Prerequisites

  • A running Bitbucket Server or Bitbucket Data Center instance
  • A Bitbucket personal access token (recommended) or username and password with repository access
  • Node.js 18+ and npm for building from source
  • An MCP-compatible client such as Claude Desktop
1

Install via Smithery (easiest)

The fastest way to install is using the Smithery CLI, which handles configuration automatically for Claude Desktop.

npx -y @smithery/cli install @garc33/bitbucket-server-mcp-server --client claude
2

Or install manually by cloning and building

Alternatively, clone the repository and build the TypeScript source if you prefer a manual installation or need to customise the server.

git clone https://github.com/garc33/bitbucket-server-mcp-server.git
cd bitbucket-server-mcp-server
npm install
npm run build
3

Gather your Bitbucket Server credentials

You need your Bitbucket Server base URL and either a personal access token (preferred) or your username and password. Generate a token in Bitbucket Server under your profile > Manage Account > Personal Access Tokens.

4

Add the server to your MCP client configuration

Open your Claude Desktop config at ~/Library/Application Support/Claude/claude_desktop_config.json and add the Bitbucket server entry with your credentials and server URL.

{
  "mcpServers": {
    "bitbucket": {
      "command": "node",
      "args": ["/path/to/bitbucket-server-mcp-server/build/index.js"],
      "env": {
        "BITBUCKET_URL": "https://your-bitbucket-server.com",
        "BITBUCKET_TOKEN": "your-personal-access-token",
        "BITBUCKET_DEFAULT_PROJECT": "YOUR_PROJECT_KEY"
      }
    }
  }
}
5

Restart Claude Desktop and verify connection

Restart Claude Desktop so it loads the new server config. Test by asking Claude to list projects or pull requests on your Bitbucket instance.

Bitbucket Server MCP Examples

Client configuration

Claude Desktop configuration for Bitbucket Server MCP with token authentication.

{
  "mcpServers": {
    "bitbucket": {
      "command": "node",
      "args": ["/path/to/bitbucket-server-mcp-server/build/index.js"],
      "env": {
        "BITBUCKET_URL": "https://your-bitbucket-server.com",
        "BITBUCKET_TOKEN": "your-personal-access-token",
        "BITBUCKET_DEFAULT_PROJECT": "YOUR_PROJECT_KEY",
        "BITBUCKET_READ_ONLY": "false"
      }
    }
  }
}

Prompts to try

Natural language prompts using the 30+ Bitbucket Server tools exposed by this MCP server.

- "List all open pull requests in the MYPROJECT repository"
- "Create a pull request from the feature/login branch to main with a description of the changes"
- "Approve the pull request #42 in the backend repository"
- "Add a review comment to line 35 of UserService.java in PR #15 asking about error handling"
- "Show me the diff for pull request #8 in the API project"
- "Search for code containing 'deprecated' across all repositories in the PLATFORM project"

Troubleshooting Bitbucket Server MCP

Connection refused or SSL certificate errors

Ensure BITBUCKET_URL uses the correct protocol (https://) and that the server is reachable from your machine. If your Bitbucket instance uses a self-signed certificate, you may need to set NODE_TLS_REJECT_UNAUTHORIZED=0 (for development only) or add the certificate to your system trust store.

Authentication fails with 401 errors

Personal access tokens are preferred over username/password. Generate a new token in Bitbucket under profile > Manage Account > Personal Access Tokens with at least Repository Read permissions. Ensure BITBUCKET_TOKEN is set (not both token and username/password simultaneously).

Diff output is truncated for large files

The server truncates large diffs showing the first 60% and last 40% of allowed lines. Adjust BITBUCKET_DIFF_MAX_LINES_PER_FILE to increase the limit, or ask Claude to focus on specific files rather than full PR diffs.

Frequently Asked Questions about Bitbucket Server MCP

What is Bitbucket Server MCP?

Bitbucket Server MCP is a Model Context Protocol (MCP) server that facilitates interaction with bitbucket server for pull request management using the mcp protocol, supporting operations such as creating, merging, commenting, and reviewing pull requests. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Bitbucket Server MCP?

Follow the installation instructions on the Bitbucket Server MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Bitbucket Server MCP?

Bitbucket Server MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Bitbucket Server MCP free to use?

Yes, Bitbucket Server MCP is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.

Browse More Version Control MCP Servers

Explore all version control servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "bitbucket-server-mcp": { "command": "npx", "args": ["-y", "bitbucket-server-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Bitbucket Server MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides