Skip to main content
Glama
MatanYemini

Bitbucket MCP

by MatanYemini

ビットバケットMCP

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

安全第一

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

コードQL GitHubリポジトリ ライセンス: MIT npmバージョン

Related MCP server: Bitbucket MCP Server

概要

公式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_URL

Bitbucket ベース URL (例: " https://bitbucket.org/your-workspace ")

はい

BITBUCKET_USERNAME

Bitbucketユーザー名

はい*

BITBUCKET_PASSWORD

Bitbucket アプリのパスワード

はい*

BITBUCKET_TOKEN

Bitbucket アクセス トークン (ユーザー名/パスワードの代替)

いいえ

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ファイルを参照してください。

リンク

Available Tools

3 tools
getPullRequestsD
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of pull requests to return
repo_slugYesRepository slug
stateNoPull request state
workspaceYesBitbucket workspace name

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

getRepositoryD
ParametersJSON Schema
NameRequiredDescriptionDefault
repo_slugYesRepository slug
workspaceYesBitbucket workspace name

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

listRepositoriesD
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of repositories to return
workspaceNoBitbucket workspace name

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv1.0.0
    • First observedgetPullRequests
    • First observedgetRepository
    • First observedlistRepositories

TDQS

D1.6/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: getPullRequests retrieves pull requests, getRepository fetches a specific repository, and listRepositories lists all repositories. There is no overlap or ambiguity between these operations.

Naming Consistency4/5

The tools follow a consistent verb_noun pattern (getPullRequests, getRepository, listRepositories), but there is a minor deviation in verb choice between 'get' and 'list'. This is still highly readable and predictable.

Tool Count2/5

With only 3 tools, the server feels thin for a Bitbucket integration, lacking essential operations like creating or updating repositories, managing pull requests (e.g., create, merge), or handling issues. The scope is incomplete for typical version control workflows.

Completeness1/5

The tool surface is severely incomplete for a Bitbucket server, missing core CRUD operations (e.g., create_repository, update_pull_request, delete_branch) and lifecycle management. Agents will face dead ends when trying to perform basic tasks like modifying repositories or pull requests.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MatanYemini/bitbucket-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server