Bitbucket Server MCP
Facilitates interaction with Bitbucket Server for pull request management using the MCP protocol, supporting operations such as creating, merging, commenting, and reviewing pull requests.
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
Maintainer
Works with
Installation
Manual Installation
npx bitbucket-server-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 claudeOr 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 buildGather 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.
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"
}
}
}
}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.
Bitbucket Server MCP Alternatives — Similar Version Control Servers
Looking for alternatives to Bitbucket Server MCP? Here are other popular version control servers you can use with Claude, Cursor, and VS Code.
Ruiyu MA
★ 30.1kConnect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
GitMCP
★ 8.1kTransforms any GitHub repository or GitHub Pages site into a documentation hub for AI assistants using the Model Context Protocol. It allows AI tools to access real-time code and documentation to prevent hallucinations and provide accurate API usage
GitHub Codemunch
★ 1.8kA token-efficient MCP server for exploring GitHub repositories using tree-sitter AST parsing to extract symbol signatures and summaries. It enables users to search and retrieve specific code components while significantly reducing token consumption c
Azure DevOps MCP Server
★ 1.7kThis server provides a convenient API for interacting with Azure DevOps services, enabling AI assistants and other tools to manage work items, code repositories, boards, sprints, and more. Built with the Model Context Protocol, it provides a standard
GitHub Official
★ 1.2kOfficial GitHub integration with comprehensive API coverage
Azure DevOps
★ 367Enables interaction with Azure DevOps through Cursor chat, providing tools to manage builds, pipelines, work items, sprints, and board operations. Supports secure authentication via Personal Access Tokens and allows natural language-driven DevOps tas
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.
Set Up Bitbucket Server MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.