Bitbucket Server MCP

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.

Integrations

  • Provides tools for managing Bitbucket Server pull requests, including creating, retrieving, merging, and declining PRs, adding comments, retrieving diffs, and managing reviews.

Bitbucket サーバー MCP

Bitbucket Server のプルリクエスト管理用の MCP (Model Context Protocol) サーバー。このサーバーは、MCP プロトコルを介して Bitbucket Server API とやり取りするためのツールとリソースを提供します。

要件

  • Node.js >= 16

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の Bitbucket Server を自動的にインストールするには:

npx -y @smithery/cli install @garc33/bitbucket-server-mcp-server --client claude

手動インストール

npm install

建てる

npm run build

特徴

サーバーは、Bitbucket Server 統合用の次のツールを提供します。

create_pull_request

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

パラメータ:

  • project : Bitbucket プロジェクト キー (設定されている場合、デフォルトは BITBUCKET_DEFAULT_PROJECT になります)
  • repository (必須): リポジトリスラッグ
  • title (必須): PRタイトル
  • description : PRの説明
  • sourceBranch (必須): ソースブランチ名
  • targetBranch (必須): ターゲットブランチ名
  • reviewers : レビュー担当者のユーザー名の配列

get_pull_request

特定のプル リクエストに関する詳細情報を取得します。

パラメータ:

  • project : Bitbucket プロジェクト キー (設定されている場合、デフォルトは BITBUCKET_DEFAULT_PROJECT になります)
  • repository (必須): リポジトリスラッグ
  • prId (必須): プルリクエストID

merge_pull_request

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

パラメータ:

  • project : Bitbucket プロジェクト キー (設定されている場合、デフォルトは BITBUCKET_DEFAULT_PROJECT になります)
  • repository (必須): リポジトリスラッグ
  • prId (必須): プルリクエストID
  • message : マージコミットメッセージ
  • strategy : 次のいずれか:
    • merge-commit (デフォルト)
    • squash
    • fast-forward

decline_pull_request

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

パラメータ:

  • project : Bitbucket プロジェクト キー (設定されている場合、デフォルトは BITBUCKET_DEFAULT_PROJECT になります)
  • repository (必須): リポジトリスラッグ
  • prId (必須): プルリクエストID
  • message : 辞退理由

add_comment

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

パラメータ:

  • project : Bitbucket プロジェクト キー (設定されている場合、デフォルトは BITBUCKET_DEFAULT_PROJECT になります)
  • repository (必須): リポジトリスラッグ
  • prId (必須): プルリクエストID
  • text (必須): コメントテキスト
  • parentId : 返信の親コメントID

get_diff

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

パラメータ:

  • project : Bitbucket プロジェクト キー (設定されている場合、デフォルトは BITBUCKET_DEFAULT_PROJECT になります)
  • repository (必須): リポジトリスラッグ
  • prId (必須): プルリクエストID
  • contextLines : コンテキスト行の数(デフォルト: 10)

get_reviews

承認やレビューを含むプル リクエストのレビュー履歴を取得します。

パラメータ:

  • project : Bitbucket プロジェクト キー (設定されている場合、デフォルトは BITBUCKET_DEFAULT_PROJECT になります)
  • repository (必須): リポジトリスラッグ
  • prId (必須): プルリクエストID

依存関係

  • @modelcontextprotocol/sdk - MCP プロトコル実装用の SDK
  • axios - APIリクエスト用のHTTPクライアント
  • winston - ロギングフレームワーク

構成

サーバーはVSCode MCP設定ファイルで設定する必要があります。設定例を以下に示します。

{ "mcpServers": { "bitbucket": { "command": "node", "args": ["/path/to/bitbucket-server/build/index.js"], "env": { "BITBUCKET_URL": "https://your-bitbucket-server.com", // Authentication (choose one): // Option 1: Personal Access Token "BITBUCKET_TOKEN": "your-access-token", // Option 2: Username/Password "BITBUCKET_USERNAME": "your-username", "BITBUCKET_PASSWORD": "your-password", // Optional: Default project "BITBUCKET_DEFAULT_PROJECT": "your-default-project" } } } }

環境変数

  • BITBUCKET_URL (必須): Bitbucket ServerインスタンスのベースURL
  • 認証(次のいずれかが必要です):
    • BITBUCKET_TOKEN : 個人アクセストークン
    • BITBUCKET_USERNAMEBITBUCKET_PASSWORD : 基本認証の資格情報
  • BITBUCKET_DEFAULT_PROJECT : ツール呼び出しで指定されていない場合に使用するデフォルトのプロジェクト キー

ログ記録

サーバーは、デバッグと監視の目的で Winston を使用してすべての操作をbitbucket.logに記録します。

You must be authenticated.

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

MCP プロトコルを使用したプル リクエスト管理のための Bitbucket Server とのやり取りを容易にし、プル リクエストの作成、マージ、コメント、レビューなどの操作をサポートします。

  1. Requirements
    1. Installation
      1. Installing via Smithery
      2. Manual Installation
    2. Build
      1. Features
        1. create_pull_request
        2. get_pull_request
        3. merge_pull_request
        4. decline_pull_request
        5. add_comment
        6. get_diff
        7. get_reviews
      2. Dependencies
        1. Configuration
          1. Environment Variables
        2. Logging
          ID: jskr5c1zq3