Bitbucket MCP Server
Provides tools for managing Pull Requests on Bitbucket Cloud, including creating, listing, updating, and reviewing PRs, adding comments, and managing reviewers and workspace members.
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 MCP Servercreate a pull request for the new login feature from branch feature/login to main"
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 MCP Server
A FastMCP server for comprehensive Bitbucket Cloud API integration. Manage pull requests, repositories, branches, commits, pipelines, issues, webhooks, snippets, and more directly from Claude.
Features
User & Account: Get current user info, user profiles, and repository permissions
Repository Management: List, create, update, delete, and fork repositories
Branch & Tag Management: Create/delete branches and tags, view branching model
Commits & Build Status: List commits, view diffs, manage build statuses
Pull Request Lifecycle: Create, update, merge, and decline PRs
Code Review: Approve, request changes, add/remove reviewers
Comments: Add, read, reply to, and delete comments (including inline code comments)
Diff & Code: View diffs, file changes, commits, and file contents
Merge Status: Check if PR can be merged, view conflicts and blockers
Pipelines (CI/CD): List, trigger, stop pipelines; view steps and logs; manage variables
Workspace & Projects: List workspaces, manage projects, search code
Issues: Create, update, list issues; manage issue comments
Webhooks: Create, list, and delete repository and workspace webhooks
Snippets: Create, list, get, and delete code snippets
Installation
From PyPI (Recommended)
pip install bitbucket-mcpOr run directly with uvx (no install needed):
uvx bitbucket-mcpGetting an API Token
Go to Atlassian API Tokens
Click Create API token
Give it a name (e.g., "Bitbucket MCP")
Copy the generated token
Configuration
Option 1: Interactive Setup (Recommended)
Use the setup_bitbucket tool:
setup_bitbucket(
workspace="your-workspace",
username="your-email@example.com",
api_token="your-api-token"
)This stores credentials securely in ~/.bitbucket-mcp/config.json with 600 permissions.
Option 2: Environment Variables
export BITBUCKET_API_TOKEN="your-api-token"
export BITBUCKET_USERNAME="your-email@example.com"
export BITBUCKET_WORKSPACE="your-workspace" # optional defaultClaude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"bitbucket": {
"command": "uvx",
"args": ["bitbucket-mcp"]
}
}
}Or if installed with pip:
{
"mcpServers": {
"bitbucket": {
"command": "bitbucket-mcp"
}
}
}Available Tools (77 total)
Configuration (2 tools)
Tool | Description |
| Configure Bitbucket credentials |
| Check configuration status |
User & Account (3 tools)
Tool | Description |
| Get authenticated user's profile |
| Get a user's public profile |
| Get current user's repository permissions |
Repository Management (7 tools)
Tool | Description |
| List repositories in a workspace |
| Get detailed repository info |
| Create a new repository |
| Update repository settings |
| Delete a repository |
| Fork a repository |
| List forks of a repository |
Branch & Tag Management (7 tools)
Tool | Description |
| List branches in a repository |
| Create a new branch |
| Delete a branch |
| List tags in a repository |
| Create a new tag |
| Delete a tag |
| Get branching model configuration |
Commits & Build Status (8 tools)
Tool | Description |
| Get file contents from a branch/commit |
| List commits in a repository |
| Get details of a specific commit |
| Get diff for a commit or range |
| Get diffstat for a commit or range |
| List build statuses for a commit |
| Create a build status for a commit |
| List comments on a commit |
Pull Requests (20 tools)
Tool | Description |
| Create a new PR with default reviewers |
| List PRs for a repository |
| Get PR details |
| Update/edit a PR |
| Approve a PR |
| Remove approval from a PR |
| Request changes on a PR |
| Add a comment to a PR |
| Get comments from a PR |
| Get summary of files changed |
| Get code diff for a PR |
| Merge a PR |
| Decline/close a PR |
| Reply to a specific comment |
| Add inline comment on code |
| Delete a comment |
| Get PR activity timeline |
| List commits in a PR |
| Add a reviewer to a PR |
| Remove a reviewer from a PR |
| Check if PR can be merged |
Pipelines / CI/CD (8 tools)
Tool | Description |
| List pipelines for a repository |
| Get pipeline details |
| Trigger a new pipeline run |
| Stop a running pipeline |
| List steps in a pipeline |
| Get log output for a step |
| List pipeline variables |
| Create a pipeline variable |
Workspace & Projects (10 tools)
Tool | Description |
| List workspace members |
| Get default reviewers for a repo |
| List all accessible workspaces |
| Get workspace details |
| List workspace permissions |
| List projects in a workspace |
| Get project details |
| Create a new project |
| Search code across repositories |
Issues (6 tools)
Tool | Description |
| List issues in a repository |
| Create a new issue |
| Get issue details |
| Update an issue |
| List comments on an issue |
| Add a comment to an issue |
Webhooks (4 tools)
Tool | Description |
| List repository webhooks |
| Create a repository webhook |
| Delete a repository webhook |
| List workspace webhooks |
Snippets (4 tools)
Tool | Description |
| List snippets in a workspace |
| Create a new snippet |
| Get snippet details |
| Delete a snippet |
Example Usage with Claude
First time setup:
"Set up Bitbucket with my workspace 'mycompany', username 'me@example.com', and API token 'abc123'"
List repositories:
"Show me all repositories in my workspace"
Create a PR:
"Create a PR in my-repo from feature/login to main titled 'Add user login'"
Review a PR:
"Approve PR #42 in my-repo"
Check merge status:
"Can PR #42 be merged? Are there any conflicts?"
Merge a PR:
"Squash merge PR #42 and delete the source branch"
Pipeline operations:
"Trigger a pipeline on the main branch for my-repo" "Show me the logs for the last pipeline run"
Branch management:
"Create a branch 'feature/new-api' from main in my-repo" "List all tags in my-repo"
Issue tracking:
"Create a bug issue titled 'Login fails on mobile' in my-repo" "Show me all open issues in my-repo"
Code search:
"Search for 'TODO' across all repositories in my workspace"
Security
Credentials are stored in
~/.bitbucket-mcp/config.jsonwith 600 permissions (owner-only access)API tokens are never logged or exposed in error messages
Environment variables are supported for CI/CD scenarios
License
MIT License - see LICENSE for details.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Appeared in Searches
Latest Blog Posts
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/Acendas/bitbucket-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server