Bitbucket MCP

MIT License
820
4
  • Linux
  • Apple

Integrations

  • Enables interaction with Bitbucket Cloud and Server APIs, providing tools for listing and retrieving repositories, managing pull requests, and working with repository content.

  • Supports working with Git repositories stored in Bitbucket, allowing access to repository content and version control operations.

ビットバケットMCP

Bitbucket CloudおよびServer APIと統合するためのModel Context Protocol(MCP)サーバー。このMCPサーバーにより、CursorなどのAIアシスタントがBitbucketリポジトリ、プルリクエスト、その他のリソースと連携できるようになります。

安全第一

これは安全で責任あるパッケージです。DELETE操作は使用されないため、データ損失のリスクはありません。すべてのプルリクエストはCodeQLで分析され、コードの安全性が確保されています。

概要

公式npmパッケージをチェックアウトしてください。このサーバーは、モデルコンテキストプロトコル標準を実装し、AIアシスタントにBitbucketのデータと操作へのアクセスを提供します。以下のツールが含まれています。

  • リポジトリの一覧表示と取得
  • リポジトリの詳細を取得する
  • プルリクエストの取得
  • さらに…

インストール

NPXの使用(推奨)

この MCP サーバーを使用する最も簡単な方法は NPX を使用することです。これにより、グローバルにインストールせずに実行できます。

# Run with environment variables BITBUCKET_URL="https://bitbucket.org/your-workspace" \ BITBUCKET_USERNAME="your-username" \ BITBUCKET_PASSWORD="your-app-password" \ npx -y bitbucket-mcp@latest

手動インストール

あるいは、グローバルにインストールすることも、プロジェクトの一部としてインストールすることもできます。

# Install globally npm install -g bitbucket-mcp # Or install in your project npm install bitbucket-mcp

次に次のコマンドで実行します:

# If installed globally BITBUCKET_URL="https://bitbucket.org/your-workspace" \ BITBUCKET_USERNAME="your-username" \ BITBUCKET_PASSWORD="your-app-password" \ bitbucket-mcp # If installed in your project BITBUCKET_URL="https://bitbucket.org/your-workspace" \ BITBUCKET_USERNAME="your-username" \ BITBUCKET_PASSWORD="your-app-password" \ npx bitbucket-mcp

構成

環境変数

次の環境変数を使用してサーバーを構成します。

変数説明必須
BITBUCKET_URLBitbucket ベース URL (例: " https://bitbucket.org/your-workspace ")はい
BITBUCKET_USERNAMEBitbucketユーザー名はい*
BITBUCKET_PASSWORDBitbucket アプリのパスワードはい*
BITBUCKET_TOKENBitbucket アクセス トークン (ユーザー名/パスワードの代替)いいえ
BITBUCKET_WORKSPACE指定されていない場合に使用するデフォルトのワークスペースいいえ

* BITBUCKET_TOKENいずれか、またはBITBUCKET_USERNAMEBITBUCKET_PASSWORDの両方を指定する必要があります。

Bitbucket アプリのパスワードを作成する

  1. Bitbucketアカウントにログインする
  2. 個人設定 > アプリパスワードに移動します
  3. 次の権限を持つ新しいアプリ パスワードを作成します。
    • リポジトリ: 読む
    • プルリクエスト: 読み取り、書き込み
  4. 生成されたパスワードをコピーし、 BITBUCKET_PASSWORD環境変数として使用します。

カーソルとの統合

この MCP サーバーを Cursor と統合するには:

  1. オープンカーソル
  2. 設定 > 拡張機能に移動します
  3. 「モデルコンテキストプロトコル」をクリックします
  4. 新しい MCP 構成を追加します。
"bitbucket": { "command": "npx", "env": { "BITBUCKET_URL": "https://bitbucket.org/your-workspace", "BITBUCKET_USERNAME": "your-username", "BITBUCKET_PASSWORD": "your-app-password" }, "args": ["-y", "bitbucket-mcp@latest"] }
  1. 設定を保存する
  2. Cursor の「/bitbucket」コマンドを使用して、Bitbucket リポジトリとプルリクエストにアクセスします。

カーソルを使ったローカルビルドの使用

ローカルで開発していて、変更をテストしたい場合は、次の手順を実行します。

"bitbucket-local": { "command": "node", "env": { "BITBUCKET_URL": "https://bitbucket.org/your-workspace", "BITBUCKET_USERNAME": "your-username", "BITBUCKET_PASSWORD": "your-app-password" }, "args": ["/path/to/your/local/bitbucket-mcp/dist/index.js"] }

利用可能なツール

このMCPサーバーは、Bitbucketリポジトリやプルリクエストを操作するためのツールを提供します。利用可能な操作の包括的なリストを以下に示します。

リポジトリ操作

listRepositories

ワークスペース内のリポジトリを一覧表示します。

パラメータ:

  • workspace (オプション): Bitbucket ワークスペース名
  • limit (オプション): 返されるリポジトリの最大数
getRepository

特定のリポジトリの詳細を取得します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ

プルリクエスト操作

getPullRequests

リポジトリのプル リクエストを取得します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • state (オプション): プルリクエストの状態 ( OPENMERGEDDECLINEDSUPERSEDED )
  • limit (オプション): 返されるプルリクエストの最大数
createPullRequest

新しいプル リクエストを作成します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • title : プルリクエストのタイトル
  • description : プルリクエストの説明
  • sourceBranch : ソースブランチ名
  • targetBranch : ターゲットブランチ名
  • reviewers (オプション): レビュー担当者のユーザー名のリスト
getPullRequest

特定のプル リクエストの詳細を取得します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
updatePullRequest

プル リクエストを更新します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
  • さまざまなオプションの更新パラメータ(タイトル、説明など)
getPullRequestActivity

プル リクエストのアクティビティ ログを取得します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
approvePullRequest

プル リクエストを承認します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
unapprovePullRequest

プル リクエストから承認を削除します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
declinePullRequest

プルリクエストを拒否します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
  • message (オプション): 辞退の理由
mergePullRequest

プル リクエストをマージします。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
  • message (オプション): マージコミットメッセージ
  • strategy (オプション): マージ戦略 ( merge-commitsquashfast-forward )
requestChanges

プル リクエストの変更をリクエストします。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
removeChangeRequest

プル リクエストから変更リクエストを削除します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID

プルリクエストコメント操作

getPullRequestComments

プル リクエストのコメントを一覧表示します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
createPullRequestComment

プル リクエストにコメントを作成します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
  • content : コメント内容
  • inline (オプション): インラインコメント情報
getPullRequestComment

プル リクエストに対する特定のコメントを取得します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
  • comment_id : コメントID
updatePullRequestComment

プル リクエストのコメントを更新します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
  • comment_id : コメントID
  • content : コメント内容を更新しました
deletePullRequestComment

プル リクエストのコメントを削除します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
  • comment_id : コメントID
resolveComment

プル リクエストのコメント スレッドを解決します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
  • comment_id : コメントID
reopenComment

プル リクエストの解決済みのコメント スレッドを再度開きます。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
  • comment_id : コメントID

プルリクエストの差分操作

getPullRequestDiff

プル リクエストの diff を取得します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
getPullRequestDiffStat

プル リクエストの diff 統計を取得します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
getPullRequestPatch

プル リクエストのパッチを取得します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID

プルリクエストタスク操作

getPullRequestTasks

プル リクエストのタスクを一覧表示します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
createPullRequestTask

プル リクエストにタスクを作成します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
  • content : タスクの内容
  • comment (オプション): タスクに関連付けるコメントID
  • pending (オプション):タスクが保留中かどうか
getPullRequestTask

プル リクエストの特定のタスクを取得します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
  • task_id : タスクID
updatePullRequestTask

プル リクエストのタスクを更新します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
  • task_id : タスクID
  • content (オプション): 更新されたタスクコンテンツ
  • state (オプション): 更新されたタスクの状態
deletePullRequestTask

プル リクエストのタスクを削除します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
  • task_id : タスクID

その他のプルリクエスト操作

getPullRequestCommits

プル リクエストのコミットを一覧表示します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID
getPullRequestStatuses

プル リクエストのコミット ステータスを一覧表示します。

パラメータ:

  • workspace : Bitbucket ワークスペース名
  • repo_slug : リポジトリのスラッグ
  • pull_request_id : プルリクエストID

発達

前提条件

  • Node.js 18以上
  • npmまたはyarn

設定

# Clone the repository git clone https://github.com/MatanYemini/bitbucket-mcp.git cd bitbucket-mcp # Install dependencies npm install # Build the project npm run build # Run in development mode npm run dev

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。

リンク

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

AI アシスタントが Bitbucket Cloud および Server API を介して Bitbucket リポジトリ、プル リクエスト、その他のリソースと対話できるようにするモデル コンテキスト プロトコル サーバー。

  1. Safety First
    1. Overview
      1. Installation
        1. Using NPX (Recommended)
        2. Manual Installation
      2. Configuration
        1. Environment Variables
        2. Creating a Bitbucket App Password
      3. Integration with Cursor
        1. Using a Local Build with Cursor
      4. Available Tools
        1. Repository Operations
        2. Pull Request Operations
        3. Pull Request Comment Operations
        4. Pull Request Diff Operations
        5. Pull Request Task Operations
        6. Other Pull Request Operations
      5. Development
        1. Prerequisites
        2. Setup
      6. License
        1. Links

          Related MCP Servers

          • A
            security
            F
            license
            A
            quality
            A Model Context Protocol server that enables AI models to interact with GitHub's API, allowing for repository creation and management with descriptions, topics, and website URLs through natural language commands.
            Last updated -
            1
            JavaScript
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that enables AI assistants like Claude to interact with GitHub repositories, issues, and pull requests.
            Last updated -
            129
            Python
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that enables AI assistants to perform GitHub operations including repository management, file operations, issue tracking, and pull request creation.
            Last updated -
            1
            TypeScript
          • -
            security
            F
            license
            -
            quality
            A comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.
            Last updated -
            16
            TypeScript

          View all related MCP servers

          ID: n7bfg1br32