mcp-bitbucket
Provides comprehensive access to Bitbucket Cloud API features for managing repositories, pull requests, issues, branches, pipelines, deployments, webhooks, and more. Supports automation of pull request workflows including creation, approval, merging and commenting.
Enables deployment of the MCP server using Docker containers, with prebuilt images available on GitHub Container Registry (GHCR) for easy deployment in containerized environments.
Integrates with GitHub for package distribution via GitHub Container Registry (GHCR) and release management, allowing users to access prebuilt Docker images and releases from GitHub.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-bitbucketlist my recent pull requests in the backend repository"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Bitbucket Model Context Protocol (MCP) Server
A high-performance, stateless Model Context Protocol (MCP) server written in Rust that brings the full power of the Bitbucket Cloud REST API to your AI agents and LLM automation tools.
By bridging Bitbucket Cloud with the MCP standard, bitbucket-mcp allows intelligent agents (like Claude, Cursor, Copilot, or Antigravity) to securely inspect, manage, and automate repositories, pull requests, issues, and CI/CD pipelines autonomously.
🚀 Features
Full Bitbucket Cloud Support: Interact with Repositories, Workspaces, Branches, Commits, Pull Requests, Issues, Pipelines, Deployments, and Webhooks.
MCP Protocol Compliant: Built strictly on the standard MCP
2024-11-05protocol specifications.Blazing Fast & Lightweight: Written in Rust, utilizing highly optimized asynchronous operations and the
rustlsstack for maximum performance and a tiny footprint.Secure by Default: Completely stateless architecture. Authentication is done via official Bitbucket API tokens passed securely via the environment.
Docker-Ready: Official images are available on the GitHub Container Registry (GHCR) for instant plug-and-play integrations.
Related MCP server: Bitbucket MCP Server
🏗️ Architecture & How It Works
bitbucket-mcp utilizes the rmcp Rust crate to expose a standard JSON-RPC interface to AI clients.
When an AI agent requests an action (like retrieving a pull request's diff), the server translates this into a strictly-typed REST API call to api.bitbucket.org.
Strict Schema Validation
Unlike simpler Node.js-based servers, this Rust implementation uses schemars to generate rigorous, strongly-typed JSON schemas for its tools. This ensures compatibility with the most strict, enterprise-grade AI LLMs (such as OpenAI's Structured Outputs), avoiding loosely-typed schema errors during tool discovery.
🛠️ Prerequisites
Bitbucket Credentials: You need a Bitbucket Cloud account and an App Password / API Token.
Create an App Password with scopes like
repository:read,pullrequest:read,pullrequest:write,issue:write, etc.
Docker (Recommended) or the Rust toolchain (if building from source).
📦 Installation & Quick Start
Option A: Using Docker (Recommended)
You can run the prebuilt Docker image directly. It accepts JSON-RPC over stdio.
docker run -i --rm \
-e BITBUCKET_API_USERNAME="your-atlassian-email@example.com" \
-e BITBUCKET_API_TOKEN="your-app-password" \
ghcr.io/ibrahimogod/bitbucket-mcp:latestOption B: Building Locally (Cargo)
If you prefer to run it natively without Docker:
# 1. Clone the repository
git clone https://github.com/Ibrahimogod/bitbucket-mcp.git
cd bitbucket-mcp
# 2. Build the optimized release binary
cargo build --release
# 3. Export credentials and run
export BITBUCKET_API_USERNAME="your-atlassian-email@example.com"
export BITBUCKET_API_TOKEN="your-app-password"
./target/release/bitbucket_stdio🔌 Integrating with AI Clients
Cursor Integration
To configure Cursor to launch the Bitbucket MCP server automatically, add the following to your global ~/.cursor/mcp.json or project-level .cursor/mcp.json:
{
"mcpServers": {
"bitbucket-mcp": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "BITBUCKET_API_USERNAME",
"-e", "BITBUCKET_API_TOKEN",
"ghcr.io/ibrahimogod/bitbucket-mcp:latest"
],
"env": {
"BITBUCKET_API_USERNAME": "<your-email>",
"BITBUCKET_API_TOKEN": "<your-app-password>"
}
}
}
}Claude Desktop Integration
For the Claude Desktop app, edit your configuration file (usually found at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"bitbucket": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "BITBUCKET_API_USERNAME",
"-e", "BITBUCKET_API_TOKEN",
"ghcr.io/ibrahimogod/bitbucket-mcp:latest"
],
"env": {
"BITBUCKET_API_USERNAME": "<your-email>",
"BITBUCKET_API_TOKEN": "<your-app-password>"
}
}
}
}🤝 Contributing
Contributions are welcome! Please ensure that your code adheres to standard Rust formatting (cargo fmt) and passes all tests (cargo test).
If you'd like to add support for a new Bitbucket Cloud endpoint:
Define the input struct in
src/common/bitbucket.rsusing#[derive(JsonSchema, Deserialize)].Add the tool handler logic annotated with
#[rmcp::tool(description = "...")].Ensure to add tests mapping the new endpoint.
📄 License
This project is licensed under the MIT License.
This server cannot be deployed
Maintenance
Related MCP Connectors
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
The Buildkite MCP server exposes Buildkite product data (pipelines, builds, jobs, and test data) to AI tools, editors, and agents through the Model Context Protocol. It provides capabilities including pipeline creation and management, build monitoring with specialized tools like 'wait_for_build', efficient log querying using Apache Parquet conversion and caching, and OAuth-based authentication for both read-write and read-only access to Buildkite's REST API.
327 dev tools via REST API and MCP. Generate Dockerfiles, schemas, K8s, APIs, and more.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI assistants to manage Bitbucket Cloud repositories, pull requests, branches, commits, pipelines, issues, and webhooks through the Model Context Protocol.81,155 npmMIT
- AlicenseBqualityDmaintenanceEnables LLMs to interact with Bitbucket repositories to manage pull requests, branches, and commits through the Model Context Protocol. It supports repository operations such as searching code, accessing file contents, and comparing branches using natural language.162,884 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Bitbucket Cloud that exposes 35 tools covering repositories, pull requests, branching models, and pipelines, enabling AI clients to automate Bitbucket workflows.3MIT
- AlicenseNot gradedqualityCmaintenanceEnables interaction with Bitbucket Cloud REST API 2.0, supporting pull requests, pipelines, logs, and repository cloning through MCP tools.33 npmMIT