M
Health: Not checked yetWe have not completed a health check for this listing yet.No health check has run yet.

Mcp Server Bitbucket

JaviMaligno
🔄 Version Control
0 Views
0 Installs

🐍 ☁️ - Bitbucket MCP server with 58 tools for repository management, PRs, pipelines, branches, commits, deployments, webhooks, tags, branch restrictions, and source browsing.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "javimaligno-mcp-server-bitbucket": {
      "command": "npx",
      "args": [
        "-y",
        "javimaligno-mcp-server-bitbucket"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

Bitbucket MCP Server

CI/CD PyPI version npm version License: MIT

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:

VersionDirectoryStatusInstallation
TypeScript/typescript✅ Recommended (Smithery)npm install -g mcp-server-bitbucket
Python/python✅ Stablepipx install mcp-server-bitbucket

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)

# Install globally
npm install -g mcp-server-bitbucket

# Or run directly with npx
npx mcp-server-bitbucket

Python

# Install with pipx
pipx install mcp-server-bitbucket

# Configure Claude Code
claude mcp add bitbucket -s user \
  -e BITBUCKET_WORKSPACE=your-workspace \
  -e BITBUCKET_EMAIL=your-email@example.com \
  -e BITBUCKET_API_TOKEN=your-api-token \
  -- mcp-server-bitbucket

Full Installation Guide - Includes API token creation, permissions setup, and troubleshooting.

Configuration

Environment Variables

VariableRequiredDescription
BITBUCKET_WORKSPACEBitbucket workspace slug
BITBUCKET_EMAILAccount email for Basic Auth
BITBUCKET_API_TOKENRepository access token
API_TIMEOUTRequest timeout in seconds (default: 30)
MAX_RETRIESMax retry attempts for rate limiting (default: 3)

Claude Code CLI

# TypeScript version
claude mcp add bitbucket -s user \
  -e BITBUCKET_WORKSPACE=your-workspace \
  -e BITBUCKET_EMAIL=your-email@example.com \
  -e BITBUCKET_API_TOKEN=your-api-token \
  -- npx mcp-server-bitbucket

# Python version
claude mcp add bitbucket -s user \
  -e BITBUCKET_WORKSPACE=your-workspace \
  -e BITBUCKET_EMAIL=your-email@example.com \
  -e BITBUCKET_API_TOKEN=your-api-token \
  -- mcp-server-bitbucket

Cursor IDE

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "bitbucket": {
      "command": "npx",
      "args": ["mcp-server-bitbucket"],
      "env": {
        "BITBUCKET_WORKSPACE": "your-workspace",
        "BITBUCKET_EMAIL": "your-email@example.com",
        "BITBUCKET_API_TOKEN": "your-api-token"
      }
    }
  }
}

Available Tools (58 total)

Repositories

ToolDescription
list_repositoriesList and search repositories
get_repositoryGet repository details
create_repositoryCreate a new repository
delete_repositoryDelete a repository
update_repositoryUpdate repo settings

Pull Requests

ToolDescription
list_pull_requestsList PRs
get_pull_requestGet PR details
create_pull_requestCreate a new PR
merge_pull_requestMerge a PR
approve_prApprove a PR
unapprove_prRemove approval
request_changes_prRequest changes
decline_prDecline a PR
list_pr_commentsList comments
add_pr_commentAdd comment
get_pr_diffGet the diff

Pipelines

ToolDescription
list_pipelinesList recent runs
get_pipelineGet status
get_pipeline_logsView logs
trigger_pipelineTrigger a run (supports custom pipelines and commit triggers)
stop_pipelineStop pipeline
list_pipeline_variablesList variables
get_pipeline_variableGet variable
create_pipeline_variableCreate variable
update_pipeline_variableUpdate variable
delete_pipeline_variableDelete variable

trigger_pipeline Parameters

ParameterTypeDescription
repo_slugstringRepository slug (required)
branchstringBranch to run on (default: main). Mutually exclusive with commit
commitstringCommit hash to run on. Mutually exclusive with branch
custom_pipelinestringName from custom: section in bitbucket-pipelines.yml
variablesarrayVariables as [{key, value, secured?}]

Examples:

# Default pipeline on main
trigger_pipeline(repo_slug="my-repo")

# Custom pipeline
trigger_pipeline(repo_slug="my-repo", custom_pipeline="deploy-staging")

# Custom pipeline on specific commit with variables
trigger_pipeline(
    repo_slug="my-repo",
    commit="abc123def",
    custom_pipeline="deploy-prod",
    variables=[
        {"key": "ENV", "value": "production"},
        {"key": "SECRET", "value": "xxx", "secured": True}
    ]
)

Branches, Commits, Tags

ToolDescription
list_branchesList branches
get_branchGet branch details
list_commitsList commits
get_commitGet commit details
compare_commitsCompare branches
get_commit_statusesGet build statuses
create_commit_statusReport CI status
list_tagsList tags
create_tagCreate a tag
delete_tagDelete a tag

And more...

  • Deployments: list_environments, get_environment, list_deployment_history
  • Webhooks: list_webhooks, create_webhook, get_webhook, delete_webhook
  • Branch Restrictions: list_branch_restrictions, create_branch_restriction, delete_branch_restriction
  • Source Browsing: get_file_content, list_directory
  • Permissions: User and group permission management (8 tools)
  • Projects: list_projects, get_project

MCP Prompts

Reusable workflow templates:

PromptDescription
code_reviewComprehensive PR code review
release_notesGenerate changelog between versions
pipeline_debugDebug failed CI/CD pipelines
repo_summaryComplete repository status overview

MCP Resources

Browsable workspace data:

Resource URIDescription
bitbucket://repositoriesList all repos
bitbucket://repositories/{repo}Repository details
bitbucket://repositories/{repo}/branchesBranch list
bitbucket://repositories/{repo}/pull-requestsOpen PRs
bitbucket://projectsList all projects

Development

TypeScript

cd typescript
npm install
npm run build
npm run dev  # Watch mode

Python

cd python
uv sync
uv run python -m src.server

Creating a Bitbucket API Token

  1. Go to your repository in Bitbucket
  2. Navigate to Repository settings > Access tokens
  3. Click Create Repository Access Token
  4. Select permissions:
    • Repository: Read, Write, Admin, Delete
    • Pull requests: Read, Write
    • Pipelines: Read, Write
  5. Copy the token immediately

Author

Built by Javier Aguilar - AI Agent Architect specializing in multi-agent orchestration and MCP development.

License

MIT

Related MCP Servers

S
Server Gitlab
Verified

📇 ☁️ 🏠 - GitLab platform integration for project management and CI/CD operations

🔄 Version Control2 views
S
Server Git
Verified

🐍 🏠 - Direct Git repository operations including reading, searching, and analyzing local repositories

🔄 Version Control1 views
M
Mcp Git Ingest

🐍 🏠 - Read and analyze GitHub repositories with your LLM

🔄 Version Control0 views
O
Oss Autopilot

📇 ☁️ 🏠 🍎 🪟 🐧 - Open source contribution manager with PR tracking across repos, issue discovery, CI failure diagnosis, and maintainer response drafting. Available as CLI, MCP server, and Claude Code plugin.

🔄 Version Control0 views
★ Featured

Moxie Docs MCP

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

View ServerFeature your own server →

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.