MCP server exposing 58 Bitbucket API tools for repos, PRs, pipelines, branches, commits, deployments, webhooks, tags, and permissions.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag โ we're steadily working through the catalog.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by MCP Server Bitbucket.
list_repositoriesList and search repositories
get_repositoryGet repository details
create_repositoryCreate a new repository
delete_repositoryDelete a repository
update_repositoryUpdate repo settings
list_pull_requestsList PRs
MCP server for Bitbucket API operations. Works with Claude Code, Claude Desktop, Cursor, and any MCP-compatible client.
This repository contains both TypeScript and Python implementations:
| Version | Directory | Status | Installation |
|---|---|---|---|
| TypeScript | /typescript | โ Recommended (Smithery) | npm install -g mcp-server-bitbucket |
| Python | /python | โ Stable | pipx install mcp-server-bitbucket |
Note: The TypeScript version is used for Smithery deployments. Both versions provide identical functionality.
Full Installation Guide - Includes API token creation, permissions setup, and troubleshooting.
| Variable | Required | Description |
|---|---|---|
BITBUCKET_WORKSPACE | โ | Bitbucket workspace slug |
BITBUCKET_EMAIL | โ (basic auth) | Account email for Basic Auth |
BITBUCKET_API_TOKEN | โ | Atlassian API token (Basic auth) |
BITBUCKET_OAUTH_TOKEN | Access token sent as Authorization: Bearer | |
BITBUCKET_AUTH_TYPE | Force auth mode: basic or bearer (auto-detected) | |
API_TIMEOUT | Request timeout in seconds (default: 30) | |
MAX_RETRIES | Max retry attempts for rate limiting (default: 3) |
Bitbucket Cloud has two credential families, and they do not share an auth scheme:
| Credential | Header | Configuration |
|---|---|---|
Atlassian API token (ATATT...), tied to a personal account | Authorization: Basic base64(email:token) | BITBUCKET_EMAIL + BITBUCKET_API_TOKEN |
Workspace / project / repository access token (ATCTT...), owned by the workspace | Authorization: Bearer <token> | BITBUCKET_OAUTH_TOKEN |
Access tokens return 401 with Basic auth, so the server picks the mode automatically:
BITBUCKET_AUTH_TYPE, when set, always wins.bearer is used when BITBUCKET_OAUTH_TOKEN is set, or when no BITBUCKET_EMAIL is configured.basic is used (the default for personal API tokens).Bearer example โ a company-owned workspace access token with no personal account involved:
The stdio server runs on your machine with your own credential, so it needs no
protection. A remote deployment is different: it holds one shared credential
and serves whoever reaches it, so /mcp can be gated on a bearer token issued
by an external authorization server (Microsoft Entra ID, Okta, Auth0โฆ).
| Variable | Description |
|---|---|
MCP_OAUTH_ISSUER | Token issuer, e.g. https://login.microsoftonline.com/<tenant>/v2.0 |
MCP_OAUTH_AUDIENCE | Expected aud claim, e.g. api://bitbucket-mcp |
MCP_OAUTH_JWKS_URI | Signing keys (derived from the issuer when omitted) |
MCP_OAUTH_REQUIRED_SCOPE | Scope the token must carry, e.g. mcp.access |
MCP_PUBLIC_URL | Public URL of this server, advertised as the resource |
Protection is off unless both MCP_OAUTH_ISSUER and MCP_OAUTH_AUDIENCE are
set, so existing deployments are unaffected. With them set, the server:
/mcp requests with 401 and a WWW-Authenticate
header pointing at /.well-known/oauth-protected-resource, which is what makes
an MCP client start the OAuth flow;iss, aud and expiry โ and returns 403 insufficient_scope when a valid
token lacks the required scope;/health open, so platform probes keep working.Note what this does and does not do: it controls who may use the server. Calls still reach Bitbucket under the server's own credential, so it does not attribute actions to individual users.
Add to ~/.cursor/mcp.json:
| Tool | Description |
|---|---|
list_repositories | List and search repositories |
get_repository | Get repository details |
create_repository | Create a new repository |
delete_repository | Delete a repository |
update_repository | Update repo settings |
| Tool | Description |
|---|---|
list_pull_requests | List PRs |
get_pull_request | Get PR details |
create_pull_request | Create a new PR |
merge_pull_request | Merge a PR |
approve_pr | Approve a PR |
unapprove_pr | Remove approval |
request_changes_pr | Request changes |
decline_pr | Decline a PR |
list_pr_comments | List comments |
add_pr_comment | Add comment |
get_pr_diff | Get the diff |
| Tool | Description |
|---|---|
list_pipelines | List recent runs |
get_pipeline | Get status |
get_pipeline_logs | View logs |
trigger_pipeline | Trigger a run (supports custom pipelines and commit triggers) |
stop_pipeline | Stop pipeline |
list_pipeline_variables | List variables |
get_pipeline_variable | Get variable |
create_pipeline_variable | Create variable |
update_pipeline_variable | Update variable |
delete_pipeline_variable | Delete variable |
| Parameter | Type | Description |
|---|---|---|
repo_slug | string | Repository slug (required) |
branch | string | Branch to run on (default: main). Mutually exclusive with commit |
commit | string | Commit hash to run on. Mutually exclusive with branch |
custom_pipeline | string | Name from custom: section in bitbucket-pipelines.yml |
variables | array | Variables as [{key, value, secured?}] |
Examples:
| Tool | Description |
|---|---|
list_branches | List branches |
get_branch | Get branch details |
list_commits | List commits |
get_commit | Get commit details |
compare_commits | Compare branches |
get_commit_statuses | Get build statuses |
create_commit_status | Report CI status |
list_tags | List tags |
create_tag | Create a tag |
delete_tag | Delete a tag |
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/javimaligno-mcp-server-bitbucket)<a href="https://allmcps.com/mcp/javimaligno-mcp-server-bitbucket"><img src="https://allmcps.com/api/badge/javimaligno-mcp-server-bitbucket?style=directory" alt="MCP Server Bitbucket on AllMCPs" /></a>