bitbucket-mcp
Provides tools for interacting with Bitbucket Cloud REST API, enabling management of repositories, branches, pull requests, and more.
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., "@bitbucket-mcp show me open pull requests in the project team/repo"
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
A FastMCP server for Bitbucket Cloud REST API.
Features
List repositories
Get repo details
List branches
List pull requests
Create/manage pull requests
And more...
Related MCP server: Bitbucket MCP
Setup
1. Create a Bitbucket API Token
Go to https://id.atlassian.com/manage-profile/security/api-tokens
Click "Create API token with scopes" (not the regular one)
Name it (e.g., "MCP Tool")
Under "Select app", choose Bitbucket
Grant the needed permissions (repo read/write, PR read/write, etc.)
Copy the token
2. Set Environment Variables
export BITBUCKET_EMAIL="your-email@domain.com"
export BITBUCKET_API_TOKEN="your-api-token-here"Or create a .env file:
BITBUCKET_EMAIL=your-email@domain.com
BITBUCKET_API_TOKEN=your-api-token-here3. Run the Server
# Using uv (recommended)
uv run --directory /path/to/bitbucket-mcp python server.py
# Or with pip
pip install -r requirements.txt
python server.py4. Connect via mcporter
Add to your mcporter.json:
{
"mcpServers": {
"bitbucket": {
"command": "/path/to/uv",
"args": [
"run",
"--directory",
"/path/to/bitbucket-mcp",
"python",
"server.py"
],
"env": {
"BITBUCKET_EMAIL": "your-email@domain.com",
"BITBUCKET_API_TOKEN": "your-api-token"
}
}
}
}Requirements
Python 3.10+
uv(optional, but recommended)
License
MIT
Available Tools
32 toolsapprove_pull_requestC
Approve a pull request.
Args: pr_id: PR ID number workspace: Workspace slug repo: Repository slug
Inputs: pr_id (required), repo, workspace. Returns: result
browse_sourceA
Browse repository source files at a specific ref (branch/tag/commit).
Args: path: File or directory path (empty for root) ref: Branch name, tag, or commit hash (default "main") workspace: Workspace slug repo: Repository slug
Inputs: ref, path, repo, workspace. Returns: result
comment_on_prA
Add a general comment to a pull request.
Args: pr_id: PR ID number body: Comment text (markdown supported) workspace: Workspace slug repo: Repository slug
Inputs: body (required), pr_id (required), repo, workspace. Returns: result
create_pull_requestA
Create a new pull request.
Args: title: PR title source_branch: Source branch name dest_branch: Destination branch (default "main") description: PR description (markdown supported) reviewers: Comma-separated reviewer UUIDs (optional) close_source: Close source branch on merge (default True) workspace: Workspace slug repo: Repository slug
Inputs: title (required), source_branch (required), repo, reviewers, +4 more. Returns: result
decline_pull_requestB
Decline (close without merging) a pull request.
Args: pr_id: PR ID number workspace: Workspace slug repo: Repository slug
Inputs: pr_id (required), repo, workspace. Returns: result
delete_pr_commentB
Delete a PR comment.
Args: pr_id: PR ID number comment_id: Comment ID to delete workspace: Workspace slug repo: Repository slug
Inputs: pr_id (required), comment_id (required), repo, workspace. Returns: result
edit_pr_commentB
Edit an existing PR comment.
Args: pr_id: PR ID number comment_id: Comment ID to edit body: New comment text workspace: Workspace slug repo: Repository slug
Inputs: body (required), pr_id (required), comment_id (required), repo, +1 more. Returns: result
get_pull_requestA
Get full details of a pull request.
Args: pr_id: Pull request ID number workspace: Workspace slug repo: Repository slug
Inputs: pr_id (required), repo, workspace. Returns: result
get_repoB
Get repository details.
Args: workspace: Workspace slug (uses default if not provided) repo: Repository slug (uses default if not provided)
Inputs: repo, workspace. Returns: result
inline_comment_on_prA
Add an inline code review comment on a specific file and line in a PR.
Args: pr_id: PR ID number body: Comment text (markdown supported) file_path: File path relative to repo root (e.g., "src/main.py") line: Line number (on the new/right side of the diff) workspace: Workspace slug repo: Repository slug
Inputs: body (required), line (required), pr_id (required), file_path (required), +2 more. Returns: result
list_branchesA
List branches in a repository.
Args: workspace: Workspace slug repo: Repository slug
Inputs: repo, workspace. Returns: result
list_commitsB
List recent commits, optionally filtered by branch.
Args: branch: Branch name (optional, defaults to all) workspace: Workspace slug repo: Repository slug
Inputs: repo, branch, workspace. Returns: result
list_pipelinesB
List recent pipelines (builds) for a repository.
Args: workspace: Workspace slug repo: Repository slug
Inputs: repo, workspace. Returns: result
list_pr_commentsB
List all comments on a pull request.
Args: pr_id: PR ID number workspace: Workspace slug repo: Repository slug
Inputs: pr_id (required), repo, workspace. Returns: result
list_pull_requestsA
List pull requests. Default shows open PRs.
Args: workspace: Workspace slug repo: Repository slug state: PR state - OPEN, MERGED, DECLINED, SUPERSEDED (default OPEN)
Inputs: repo, state, workspace. Returns: result
list_reposA
List repositories in a workspace.
Args: workspace: Workspace slug (uses default if not provided)
Inputs: workspace. Returns: result
list_workspacesA
List all Bitbucket workspaces you have access to.
Inputs: no named parameters. Returns: result
merge_pull_requestA
Merge a pull request.
Args: pr_id: PR ID number strategy: Merge strategy - merge_commit, squash, or fast_forward (optional, uses repo default) close_source: Close/delete source branch after merge (default True) workspace: Workspace slug repo: Repository slug
Inputs: pr_id (required), repo, strategy, workspace, +1 more. Returns: result
pipeline_stepsA
Get steps/stages of a pipeline run.
Args: pipeline_uuid: Pipeline UUID workspace: Workspace slug repo: Repository slug
Inputs: pipeline_uuid (required), repo, workspace. Returns: result
pr_activityA
Get activity log for a pull request (approvals, comments, updates).
Args: pr_id: PR ID number workspace: Workspace slug repo: Repository slug
Inputs: pr_id (required), repo, workspace. Returns: result
pr_build_statusA
Get build/pipeline statuses for a pull request.
Args: pr_id: PR ID number workspace: Workspace slug repo: Repository slug
Inputs: pr_id (required), repo, workspace. Returns: result
pr_commitsA
List commits in a pull request.
Args: pr_id: PR ID number workspace: Workspace slug repo: Repository slug
Inputs: pr_id (required), repo, workspace. Returns: result
pr_diffB
Get the full diff of a pull request.
Args: pr_id: PR ID number workspace: Workspace slug repo: Repository slug
Inputs: pr_id (required), repo, workspace. Returns: result
pr_diffstatA
Get diffstat (files changed summary) for a pull request.
Args: pr_id: PR ID number workspace: Workspace slug repo: Repository slug
Inputs: pr_id (required), repo, workspace. Returns: result
remove_request_changesA
Remove your request-changes from a pull request.
Args: pr_id: PR ID number workspace: Workspace slug repo: Repository slug
Inputs: pr_id (required), repo, workspace. Returns: result
reply_to_pr_commentA
Reply to an existing PR comment.
Args: pr_id: PR ID number parent_comment_id: ID of the comment to reply to body: Reply text workspace: Workspace slug repo: Repository slug
Inputs: body (required), pr_id (required), parent_comment_id (required), repo, +1 more. Returns: result
request_changes_on_prC
Request changes on a pull request.
Args: pr_id: PR ID number workspace: Workspace slug repo: Repository slug
Inputs: pr_id (required), repo, workspace. Returns: result
stop_pipelineC
Stop a running pipeline.
Args: pipeline_uuid: Pipeline UUID (from list_pipelines) workspace: Workspace slug repo: Repository slug
Inputs: pipeline_uuid (required), repo, workspace. Returns: result
trigger_pipelineA
Trigger a pipeline run for a branch.
Args: branch: Branch name to run pipeline on custom_pattern: Custom pipeline name (optional, for custom pipelines in bitbucket-pipelines.yml) workspace: Workspace slug repo: Repository slug
Inputs: branch (required), repo, workspace, custom_pattern. Returns: result
unapprove_pull_requestB
Remove your approval from a pull request.
Args: pr_id: PR ID number workspace: Workspace slug repo: Repository slug
Inputs: pr_id (required), repo, workspace. Returns: result
update_pull_requestA
Update a pull request (title, description, reviewers, destination).
Args: pr_id: PR ID number title: New title (optional) description: New description (optional) reviewers: Comma-separated reviewer UUIDs to set (optional) dest_branch: New destination branch (optional) workspace: Workspace slug repo: Repository slug
Inputs: pr_id (required), repo, title, reviewers, +3 more. Returns: result
whoamiA
Check current Bitbucket auth. Returns the authenticated user info.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 32 tools
Each tool targets a distinct resource and action. Comment tools are differentiated by operation (list/add/inline/reply/edit/delete), and PR views are clearly separated by data type (diff, diffstat, commits, activity, build status). No two tools appear to serve the same purpose.
Most tools follow a verb_noun pattern (list_repos, create_pull_request), but there are notable deviations: data-view tools use a noun-first 'pr_' prefix (pr_diff, pr_commits, pr_activity, pr_build_status) and 'pipeline_steps' lacks a verb. The resource is inconsistently called 'pull_request' in some tools and 'pr' in others, and comment actions use varying prepositions (on, to). Still, the names remain readable and understandable.
At 32 tools, the server exceeds the 'borderline' range of 16-25 and feels heavy. While many tools are justified for a Bitbucket API, there is some overlap (e.g., list_commits vs pr_commits) and the PR comment workflow alone accounts for six tools. The count would be more appropriate if consolidated or scoped tighter, such as focusing on core PR operations.
The pull request lifecycle is thoroughly covered (create, update, approve, merge, decline, comments, diff, commits, activity, build status). However, repository management is incomplete: there is no create/update/delete repo, and branch operations are limited to listing. These are notable gaps for a Bitbucket integration and could force agents to use external tools.
Maintenance
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server for Appcircle mobile CI/CD platform.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that provides tools for interacting with the Bitbucket API, supporting both Bitbucket Cloud and Bitbucket Server, enabling pull request, branch, file, code review, and search operations.198,411 npmMIT
- AlicenseBqualityDmaintenanceAn MCP server for Bitbucket Cloud that enables managing pull requests, branches, and repositories in natural language from any MCP-capable client.23387 npm4MIT
- FlicenseCqualityDmaintenanceAn MCP server for Bitbucket Cloud, covering pull requests, pull request comments, and pipelines.26-
- AlicenseAqualityDmaintenanceMCP server for Bitbucket Cloud that enables reviewing, managing, and merging pull requests, assigning reviewers by name, reading files at a ref, and inspecting pipeline status from any MCP client.14MIT