Bitbucket MCP
The Bitbucket MCP server is a Model Context Protocol interface that enables AI assistants to fully manage Bitbucket Cloud resources:
Workspaces – List workspaces, get details, list projects, and list members.
Repositories – List, get, create, delete, and fork repositories; retrieve file contents and browse source listings.
Pull Requests – List, get, create, update, merge, approve, unapprove, and decline PRs; manage comments (including inline); retrieve diffs.
Branches & Tags – List, get, create, and delete branches and tags.
Commits – List commits, get commit details, and retrieve diffs or diffstats between refs.
Pipelines (CI/CD) – List, get, trigger (including custom), and stop pipelines; inspect steps and logs; configure pipeline enablement; manage pipeline variables (list, get, create, update, delete).
Issues – List, get, create, update, and delete issues; manage comments; vote/unvote and watch/unwatch.
Webhooks – Full CRUD management of repository-level and workspace-level webhooks (URLs, events, secrets, active status).
Output Formats – All tools support
json(full),toon(~50% token savings), andcompact(~76% token savings) formats.Authentication – Supports API token, app password (basic auth), and OAuth.
Enables management of Bitbucket Cloud repositories, pull requests, branches, commits, pipelines, issues, and webhooks. Supports workspace and project operations, code reviews, CI/CD pipeline triggers, and issue tracking.
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 list open pull requests in the frontend 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
A Model Context Protocol (MCP) server for Bitbucket Cloud. Enables AI assistants to manage repositories, pull requests, pipelines, and more.
Installation
Option 1: Using npx (Recommended)
No installation required. Run directly:
npx @icy-r/bitbucket-mcpOption 2: Global Installation
npm install -g @icy-r/bitbucket-mcp
bitbucket-mcpOption 3: Local Development
git clone https://github.com/icy-r/bitbucket-mcp.git
cd bitbucket-mcp
pnpm install
pnpm build
node dist/index.jsRelated MCP server: mcp-bitbucket
MCP Client Configuration
Cursor IDE
Add to your Cursor MCP settings (~/.cursor/mcp.json on Windows: %USERPROFILE%\.cursor\mcp.json):
Using npx (Recommended):
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": ["-y", "@icy-r/bitbucket-mcp"],
"env": {
"BITBUCKET_AUTH_METHOD": "api_token",
"BITBUCKET_USER_EMAIL": "your.email@example.com",
"BITBUCKET_API_TOKEN": "your_api_token"
}
}
}
}Using local build:
{
"mcpServers": {
"bitbucket": {
"command": "node",
"args": ["D:\\path\\to\\bitbucket-mcp\\dist\\index.js"],
"env": {
"BITBUCKET_AUTH_METHOD": "api_token",
"BITBUCKET_USER_EMAIL": "your.email@example.com",
"BITBUCKET_API_TOKEN": "your_api_token"
}
}
}
}Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": ["-y", "@icy-r/bitbucket-mcp"],
"env": {
"BITBUCKET_AUTH_METHOD": "api_token",
"BITBUCKET_USER_EMAIL": "your.email@example.com",
"BITBUCKET_API_TOKEN": "your_api_token"
}
}
}
}Other MCP Clients
The server follows the MCP standard and works with any compatible client. Use the configuration pattern above, adjusting paths as needed for your platform.
Authentication
API Token (Recommended)
Go to Bitbucket API Tokens
Create a new token with the required permissions
Set the environment variables:
BITBUCKET_AUTH_METHOD=api_token
BITBUCKET_USER_EMAIL=your.email@example.com
BITBUCKET_API_TOKEN=your_api_tokenApp Password
Go to Bitbucket App Passwords
Create a new app password with required permissions
Use
basicauth method with your username and app password
Environment Variables
Variable | Description | Required |
|
| Yes |
| Your Atlassian email | For api_token |
| API token | For api_token |
| Bitbucket username | For basic auth |
| App password | For basic auth |
| Default workspace (used when tool call omits | No |
|
| No |
Available Tools
Tool | Actions |
| list, get, list_projects, list_members |
| list, get, create, delete, fork, get_file, list_source |
| list, get, create, update, merge, approve, unapprove, decline, list_comments, add_comment, get_diff |
| list_branches, get_branch, create_branch, delete_branch, list_tags, get_tag, create_tag |
| list, get, get_diff, get_diffstat |
| list, get, trigger, trigger_custom, stop, list_steps, get_step, get_logs, get_config, set_enabled, list_variables, get_variable, create_variable, update_variable, delete_variable |
| list, get, create, update, delete, list_comments, add_comment, vote, unvote, watch, unwatch |
| list, get, create, update, delete, list_workspace, get_workspace, create_workspace, update_workspace, delete_workspace |
Output Formats
Control response verbosity with the format parameter:
Format | Description | Token Savings |
| Full JSON output | 0% |
| Compact TOON format | ~50% |
| Essential fields only | ~76% |
Example usage:
{ "action": "list", "workspace": "my-workspace", "format": "compact" }Examples
List repositories in a workspace
{
"action": "list",
"workspace": "my-workspace"
}Create a pull request
{
"action": "create",
"workspace": "my-workspace",
"repo_slug": "my-repo",
"title": "Feature: Add new functionality",
"source_branch": "feature/new-feature",
"destination_branch": "main"
}Trigger a pipeline
{
"action": "trigger",
"workspace": "my-workspace",
"repo_slug": "my-repo",
"branch_name": "main"
}Default workspace
Set BITBUCKET_WORKSPACE in your environment to skip the workspace parameter on every tool call:
{ "action": "list", "repo_slug": "my-repo" }Development
# Clone the repository
git clone https://github.com/icy-r/bitbucket-mcp.git
cd bitbucket-mcp
# Install dependencies
pnpm install
# Build
pnpm build
# Run tests
pnpm test
# Run in development mode (watch)
pnpm dev
# Lint and format
pnpm lint
pnpm formatRequirements
Node.js >= 20.0.0
pnpm (for development)
License
MIT
Available Tools
8 toolsbitbucket_branchesB
Manage Bitbucket branches and tags. Actions:
list_branches: List all branches in a repository
get_branch: Get details of a specific branch
create_branch: Create a new branch from a commit/ref
delete_branch: Delete a branch
list_tags: List all tags in a repository
get_tag: Get details of a specific tag
create_tag: Create a new tag
Inputs: action (required), repo_slug (required), workspace, branch_name, +8 more.
bitbucket_commitsB
Manage Bitbucket commits and diffs. Actions:
list: List commits in a repository
get: Get details of a specific commit
get_diff: Get diff between two refs (e.g., "branch1..branch2" or "commit1..commit2")
get_diffstat: Get diffstat (summary of changes) between two refs
Inputs: action (required), repo_slug (required), workspace, commit_hash, +8 more.
bitbucket_issuesB
Manage Bitbucket issue tracking. Actions:
list: List issues in a repository
get: Get details of a specific issue
create: Create a new issue
update: Update an existing issue
delete: Delete an issue
list_comments: List comments on an issue
add_comment: Add a comment to an issue
vote: Vote for an issue
unvote: Remove vote from an issue
watch: Watch an issue for notifications
unwatch: Stop watching an issue
Inputs: action (required), repo_slug (required), workspace, issue_id, +12 more.
bitbucket_pipelinesA
Manage Bitbucket Pipelines CI/CD. Actions:
list: List pipelines in a repository
get: Get details of a specific pipeline
trigger: Trigger a new pipeline run on a branch
trigger_custom: Trigger a custom pipeline with a specific pattern
stop: Stop a running pipeline
list_steps: List steps of a pipeline
get_step: Get details of a specific step
get_logs: Get logs for a pipeline step
get_config: Get pipeline configuration (enabled status)
set_enabled: Enable or disable pipelines for a repository
list_variables: List pipeline variables
get_variable: Get a specific pipeline variable
create_variable: Create a pipeline variable
update_variable: Update a pipeline variable
delete_variable: Delete a pipeline variable
Inputs: action (required), repo_slug (required), workspace, pipeline_uuid, +14 more.
bitbucket_pull_requestsB
Manage Bitbucket pull requests. Actions:
list: List pull requests in a repository
get: Get pull request details
create: Create a new pull request
update: Update a pull request
merge: Merge a pull request
approve: Approve a pull request
unapprove: Remove approval from a pull request
decline: Decline a pull request
list_comments: List comments on a pull request
add_comment: Add a comment to a pull request
get_diff: Get the diff of a pull request
Inputs: action (required), repo_slug (required), workspace, pr_id, +18 more.
bitbucket_repositoriesC
Manage Bitbucket repositories. Actions:
list: List repositories in a workspace
get: Get repository details
create: Create a new repository
delete: Delete a repository
fork: Fork a repository
get_file: Get file content from a repository
list_source: List files/directories in a repository path
Inputs: action (required), workspace, repo_slug, q, +13 more.
bitbucket_webhooksB
Manage Bitbucket webhooks for repositories and workspaces. Actions:
list: List webhooks for a repository
get: Get details of a specific webhook
create: Create a new webhook
update: Update an existing webhook
delete: Delete a webhook
list_workspace: List webhooks for a workspace
get_workspace: Get a workspace webhook
create_workspace: Create a workspace webhook
update_workspace: Update a workspace webhook
delete_workspace: Delete a workspace webhook
Inputs: action (required), workspace, repo_slug, webhook_uuid, +8 more.
bitbucket_workspacesB
Manage Bitbucket workspaces. Actions:
list: List all accessible workspaces
get: Get details of a specific workspace
list_projects: List projects in a workspace
list_members: List members of a workspace
Inputs: action (required), workspace, page, pagelen, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool covers a distinct Bitbucket domain (branches, commits, issues, pipelines, pull requests, repositories, webhooks, workspaces) with no overlap in primary functionality. An agent can easily select the correct tool for a task.
All tools follow a consistent 'bitbucket_<domain>' pattern, and within each tool, action names are short, clear verbs. The naming scheme is predictable and uniform across the entire set.
With 8 tools covering the major Bitbucket features, the count is well-scoped for the platform's complexity. Each tool represents a natural grouping of related actions, avoiding unnecessary fragmentation or lumping.
The tool surface covers all core Bitbucket operations: source control (branches, commits), collaboration (PRs, issues), CI/CD (pipelines), repository management, webhooks, and workspaces. Critical workflows like create/update/delete are present where applicable.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Read and write KukGit repositories, files, issues and pull requests from an AI assistant.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables LLMs to interact with Bitbucket repositories to manage pull requests, branches, and commits through the Model Context Protocol. It supports repository operations such as searching code, accessing file contents, and comparing branches using natural language.165,856 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI systems to securely interact with self-hosted Bitbucket repositories, pull requests, projects, and code through the Model Context Protocol.59 npm23Apache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to list and retrieve repositories, inspect and create pull requests, and access Bitbucket Cloud and Server data and operations through the Model Context Protocol.5,856 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Bitbucket Cloud and Server APIs, providing access to repositories, pull requests, and related operations through the Model Context Protocol.5,856 npmMIT