Bitbucket Cloud MCP Server
Provides tools for managing Bitbucket Cloud repositories, pull requests, issues, pipelines, and more via the Bitbucket Cloud REST API.
Click on "Install 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., "@Bitbucket Cloud MCP ServerShow open pull requests in my Bitbucket 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 Cloud MCP Server
A Model Context Protocol (MCP) server for the Bitbucket Cloud REST API v2.0. Works with any MCP client — Claude Code, GitHub Copilot, OpenAI Codex, and more. Provides 32 tools across 5 toolsets with safety controls and compact LLM-optimized output.
Setup
Prerequisites
Node.js v24+
Atlassian API token (see below)
Create an API Token
Go to Atlassian API Tokens
Click "Create API token with scopes"
Name the token (e.g., "Bitbucket MCP") and set expiration
Select app: Bitbucket
Enable the scopes listed below
Click Create and copy the token
Read-only scopes (6 scopes — sufficient when using BITBUCKET_READONLY=true):
Scope | Enables |
|
|
|
|
|
|
|
|
|
|
|
|
Write scopes (add these 4 for full access):
Scope | Enables |
|
|
|
|
|
|
|
|
Add to Your MCP Client
One command — no clone or build needed:
claude mcp add bitbucket \
-e ATLASSIAN_USER_EMAIL=your-email@example.com \
-e ATLASSIAN_API_TOKEN=your-api-token \
-e BITBUCKET_READONLY=false \
-- npx -y @or2ooo/bitbucket-mcp@latestVerify with:
claude mcp listAdd to .vscode/mcp.json in your project root:
{
"servers": {
"bitbucket": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@or2ooo/bitbucket-mcp@latest"],
"env": {
"ATLASSIAN_USER_EMAIL": "your-email@example.com",
"ATLASSIAN_API_TOKEN": "your-api-token",
"BITBUCKET_READONLY": "false"
}
}
}
}Add to ~/.codex/config.toml:
[mcp_servers.bitbucket]
command = "npx"
args = ["-y", "@or2ooo/bitbucket-mcp@latest"]
env = { ATLASSIAN_USER_EMAIL = "your-email@example.com", ATLASSIAN_API_TOKEN = "your-api-token", BITBUCKET_READONLY = "false" }git clone https://github.com/or2ooo/bitbucket-mcp.git
cd bitbucket-mcp
npm install && npm run build
claude mcp add bitbucket \
-e ATLASSIAN_USER_EMAIL=your-email@example.com \
-e ATLASSIAN_API_TOKEN=your-api-token \
-e BITBUCKET_READONLY=true \
-- node $(pwd)/dist/index.jsRelated MCP server: Bitbucket MCP Server
Environment Variables
Variable | Required | Description |
| Yes | Atlassian account email |
| Yes | Atlassian API token (see Create an API Token) |
| No | Default workspace slug |
| No | Comma-separated allowlist of workspace slugs |
| No | Comma-separated allowlist ( |
| No |
|
| No | Override API base URL |
Safety Controls
Readonly mode: Set
BITBUCKET_READONLY=trueto prevent any write operations.Workspace allowlist: Restrict access to specific workspaces.
Repository allowlist: Restrict access to specific repositories.
Destructive action confirmation: Merge PR, decline PR, and delete branch tools require explicit
confirm: true.
Tool Reference
Context (2 tools)
Tool | Description |
| Get current authenticated user |
| List accessible workspaces |
Repositories (10 tools)
Tool | Description |
| List repositories in a workspace |
| Get repository details |
| List branches |
| List commits (optionally for a branch/tag) |
| Get file content at a specific revision |
| Create a commit with file changes (write) |
| Create a new branch (write) |
| Delete a branch (destructive, requires confirm) |
| List directory contents at a specific revision |
| Search for code in a workspace or repository |
Pull Requests (12 tools)
Tool | Description |
| List PRs with optional state filter |
| Get PR details |
| Create a new PR (write) |
| Update PR title, description, or reviewers (write) |
| Get PR diff (raw text) |
| Get PR diffstat summary |
| List PR activity (comments, approvals, updates) |
| Add a comment to a PR (write) |
| Approve a PR (write) |
| Request changes on a PR (write) |
| Merge a PR (destructive, requires confirm) |
| Decline a PR (destructive, requires confirm) |
Issues (4 tools)
Tool | Description |
| List issues with optional query |
| Get issue details |
| Create a new issue (write) |
| Add a comment to an issue (write) |
Pipelines (3 tools)
Tool | Description |
| List recent pipelines |
| Get pipeline details |
| Trigger a pipeline run (write) |
Development
npm test # Run tests
npm run lint # Lint
npm run build # CompileContributing
See CONTRIBUTING.md for development setup and guidelines.
Security
See SECURITY.md for reporting vulnerabilities.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/or2ooo/bitbucket-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server