bitbucket-mcp
Bitbucket Model Context Protocol (MCP) server in Rust with full Bitbucket Cloud REST API support and Docker deployment.
Documentation
Bitbucket MCP Server
Bitbucket MCP is a high-performance, stateless server that brings the full power of the Bitbucket Cloud API to your automation, CI/CD pipelines, bots, and Rust-based integrations. Built in Rust for speed and reliability, Bitbucket MCP makes it easy to securely access and manage Bitbucket repositories, pull requests, issues, and more—whether you're building developer tools, workflow automation, or DevOps solutions.
Why Bitbucket MCP?
- Seamless Bitbucket API Integration: Access all major Bitbucket Cloud features—repositories, pull requests, issues, branches, pipelines, deployments, and more—using a modern Rust codebase.
- Perfect for Automation & Bots: Expose Bitbucket as Model Context Protocol (MCP) tools, ideal for bots, CI/CD, and workflow automation.
- Secure by Default: Uses only `rustls` for TLS (no OpenSSL headaches), and supports Bitbucket API token authentication.
- Docker-Ready: Deploy anywhere with our prebuilt Docker images on GHCR, or build locally in minutes.
- Battle-Tested: Comprehensive test suite covers all public API methods, ensuring reliability for your integrations.
Quick Start: Bitbucket API Automation in Rust
1. Use the Prebuilt Docker Image from GHCR
docker run -e BITBUCKET_API_USERNAME= -e BITBUCKET_API_TOKEN= -p 8080:8080 ghcr.io/ibrahimogod/bitbucket-mcp:latest- Find all tags/releases at: GitHub Releases
- See GHCR package
2. Build and Run Locally (Rust)
git clone https://github.com/Ibrahimogod/bitbucket-mcp.git
cd bitbucket-mcp
cargo build --release
$env:BITBUCKET_API_USERNAME=""
$env:BITBUCKET_API_TOKEN=""
cargo run --release --bin bitbucket_stdioSupported Bitbucket Operations (via MCP)
- List and manage repositories, workspaces, pull requests, issues, branches, tags, commits
- Get repository, workspace, and user details
- Automate pull request workflows: create, update, approve, decline, merge, comment, and manage tasks
- Integrate with Bitbucket pipelines, deployments, downloads, webhooks, snippets, and projects
- See `src/common/bitbucket.rs` for the full API
Bitbucket Authentication
- Create a Bitbucket API Token with the appropriate scopes (e.g. `repository:read`, `pullrequest:read`).
- Set `BITBUCKET_API_USERNAME` to your Atlassian email.
- Set `BITBUCKET_API_TOKEN` to your API token.
Project Structure
- `src/common/bitbucket.rs` — Bitbucket API integration logic
- `src/bitbucket_stdio.rs` — Server entry point
- `Cargo.toml` — Dependency configuration (uses `rustls` only)
- `Dockerfile` — Multi-stage build, no OpenSSL
- `tests/bitbucket.rs` — Full test suite for all public API methods
License
MIT
Bitbucket MCP is the best way to automate Bitbucket Cloud with Rust, bots, or CI/CD. Star the repo and try it today!
Example: VS Code MCP Settings for Docker Integration
You can configure the VS Code MCP extension to launch the Bitbucket MCP server automatically using Docker. Add the following to your `.vscode/settings.json` (or your global MCP settings file):
{
"mcp": {
"servers": {
"bitbucket-mcp-docker": {
"command": "docker",
"args": [
"run",
"-i",
"-e", "BITBUCKET_API_USERNAME",
"-e", "BITBUCKET_API_TOKEN",
"-e", "RUST_BACKTRACE",
"ghcr.io/ibrahimogod/bitbucket-mcp:latest"
],
"env": {
"BITBUCKET_API_USERNAME": "",
"BITBUCKET_API_TOKEN": "",
"RUST_BACKTRACE": "1"
}
}
}
}
}Replace `` and `` with your Bitbucket credentials. You can also specify a particular image tag instead of `latest` if needed.
This configuration allows the MCP extension to start the Bitbucket MCP server in Docker automatically when you use Bitbucket tools in VS Code.
Example: Cursor MCP Settings for Docker Integration
You can configure Cursor to launch the Bitbucket MCP server automatically using Docker. Add the following to your `.cursor/mcp.json` (for project) or `~/.cursor/mcp.json` (for global use):
{
"mcpServers": {
"bitbucket-mcp-docker": {
"command": "docker",
"args": [
"run",
"-i",
"-e", "BITBUCKET_API_USERNAME",
"-e", "BITBUCKET_API_TOKEN",
"-e", "RUST_BACKTRACE",
"ghcr.io/ibrahimogod/bitbucket-mcp:latest"
],
"env": {
"BITBUCKET_API_USERNAME": "",
"BITBUCKET_API_TOKEN": "",
"RUST_BACKTRACE": "1"
}
}
}
}Replace `` and `` with your Bitbucket credentials. You can also specify a particular image tag instead of `latest` if needed.
This configuration allows Cursor to start the Bitbucket MCP server in Docker automatically when you use Bitbucket tools.
Frequently asked questions
What is bitbucket-mcp?
bitbucket-mcp is Bitbucket Model Context Protocol (MCP) server in Rust with full Bitbucket Cloud REST API support and Docker deployment.
How do I install bitbucket-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is bitbucket-mcp open source?
Yes — it is hosted on GitHub at https://github.com/Ibrahimogod/bitbucket-mcp.
Related MCP tools
an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Search infrastructure for AI
YC (S26) | Open Computer History | Record your screen continuously locally and provide context to your agents (Claude, Codex, Openclaw, Hermes, Runner...)
The fastest and the most accurate file search SDK for AI agents, Neovim, Rust, C, Python, Bun and NodeJS
Semantic version control => entity-level diffs, blame, and impact analysis on top of git. 28 languages via tree-sitter. Built for coding agents.
Fast, local-first web content extraction for LLMs. Scrape, crawl, extract structured data — all from Rust. CLI, REST API, and MCP server.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP