The mcp-server-bitbucket is a comprehensive Model Context Protocol (MCP) server providing complete Bitbucket API integration for managing repositories, code, and CI/CD workflows through Claude, Cursor, or any MCP-compatible client.
Core Capabilities:
Repository Management: Create, read, update, delete, and list repositories with filtering by project, fuzzy name search, or advanced query syntax; update visibility, description, name, and move between projects.
Pull Request Workflow: Create, merge, approve, unapprove, decline, and request changes; list by state (OPEN/MERGED/DECLINED); view diffs; add general or inline comments; support for merge commit, squash, and fast-forward strategies.
CI/CD Pipeline Management: Trigger, monitor, stop, and view logs for pipeline runs; manage environment variables (create, read, update, delete, including secured values); get and create commit build statuses.
Branch & Commit Operations: List and get details for branches and commits with filtering by branch or file path; compare commits/branches; create branch restrictions (require approvals, prevent force push).
Version Control: Create, list, and delete tags; compare commits or branches to see file changes.
Source Code Browsing: Read file contents and list directory structures without cloning repositories.
Deployment Management: List and get details for deployment environments (test, staging, production); track deployment history.
Project Organization: List projects, get project details, and move repositories between projects.
Access Control: Manage user and group permissions (read, write, admin) for repositories.
Webhook Integration: Create, list, get, and delete webhooks for repository events (push, PR actions, comments, etc.).
Advanced Features: 58 total tools providing comprehensive API coverage; MCP resources for browsable workspace data; reusable MCP prompts for code review, release notes, pipeline debugging, and repo summaries; available in TypeScript and Python.
Provides comprehensive Bitbucket API operations including repository management, pull request workflows, pipeline orchestration, branch and tag management, commit tracking, deployment monitoring, webhook configuration, file browsing, and permissions management.
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., "@mcp-server-bitbucketlist recent pull requests for my-project 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 MCP Server
MCP server for Bitbucket API operations. Works with Claude Code, Claude Desktop, Cursor, and any MCP-compatible client.
Language Versions
This repository contains both TypeScript and Python implementations:
Version | Directory | Status | Installation |
TypeScript |
| ✅ Recommended (Smithery) |
|
Python |
| ✅ Stable |
|
Note: The TypeScript version is used for Smithery deployments. Both versions provide identical functionality.
Features
Repositories: get, create, delete, list, update (move to project, rename)
Pull Requests: create, get, list, merge, approve, decline, request changes, comments, diff
Pipelines: trigger, get status, list, view logs, stop
Branches: list, get
Projects: list, get
Commits: list, get details, compare/diff between branches
Commit Statuses: get build statuses, create status (CI/CD integration)
Deployments: list environments, get environment details, deployment history
Webhooks: list, create, get, delete
Tags: list, create, delete
Branch Restrictions: list, create, delete branch protection rules
Source Browsing: read files, list directories without cloning
Repository Permissions: manage user and group permissions
Pipeline Variables: manage CI/CD environment variables
MCP Prompts: reusable workflow templates (code review, release notes, etc.)
MCP Resources: browsable workspace data
Quick Start
TypeScript (Recommended for Smithery)
Python
Full Installation Guide - Includes API token creation, permissions setup, and troubleshooting.
Configuration
Environment Variables
Variable | Required | Description |
| ✅ | Bitbucket workspace slug |
| ✅ | Account email for Basic Auth |
| ✅ | Repository access token |
| Request timeout in seconds (default: 30) | |
| Max retry attempts for rate limiting (default: 3) |
Claude Code CLI
Cursor IDE
Add to ~/.cursor/mcp.json:
Available Tools (58 total)
Repositories
Tool | Description |
| List and search repositories |
| Get repository details |
| Create a new repository |
| Delete a repository |
| Update repo settings |
Pull Requests
Tool | Description |
| List PRs |
| Get PR details |
| Create a new PR |
| Merge a PR |
| Approve a PR |
| Remove approval |
| Request changes |
| Decline a PR |
| List comments |
| Add comment |
| Get the diff |
Pipelines
Tool | Description |
| List recent runs |
| Get status |
| View logs |
| Trigger a run |
| Stop pipeline |
| List variables |
| Get variable |
| Create variable |
| Update variable |
| Delete variable |
Branches, Commits, Tags
Tool | Description |
| List branches |
| Get branch details |
| List commits |
| Get commit details |
| Compare branches |
| Get build statuses |
| Report CI status |
| List tags |
| Create a tag |
| Delete a tag |
And more...
Deployments:
list_environments,get_environment,list_deployment_historyWebhooks:
list_webhooks,create_webhook,get_webhook,delete_webhookBranch Restrictions:
list_branch_restrictions,create_branch_restriction,delete_branch_restrictionSource Browsing:
get_file_content,list_directoryPermissions: User and group permission management (8 tools)
Projects:
list_projects,get_project
MCP Prompts
Reusable workflow templates:
Prompt | Description |
| Comprehensive PR code review |
| Generate changelog between versions |
| Debug failed CI/CD pipelines |
| Complete repository status overview |
MCP Resources
Browsable workspace data:
Resource URI | Description |
| List all repos |
| Repository details |
| Branch list |
| Open PRs |
| List all projects |
Development
TypeScript
Python
Creating a Bitbucket API Token
Go to your repository in Bitbucket
Navigate to Repository settings > Access tokens
Click Create Repository Access Token
Select permissions:
Repository: Read, Write, Admin, Delete
Pull requests: Read, Write
Pipelines: Read, Write
Copy the token immediately
License
MIT