Bitbucket MCP Server
Bitbucket MCP
Cursor IDE と Bitbucket Cloud を統合する Model Context Protocol (MCP) サーバーです。Bitbucket ワークスペースからリポジトリ情報やコミットデータを直接取得できます。
機能
リポジトリ一覧: Bitbucket ワークスペースからすべてのリポジトリを取得
リポジトリ詳細: 特定のリポジトリに関する詳細情報を取得
コミット情報: コミット履歴と最新のコミット詳細を取得
コミット数: リポジトリごとの合計コミット数を取得
最新コミットデータ: 各リポジトリの最新のコミット日、作成者、メッセージを取得
ワークスペース: 利用可能なすべてのワークスペースを一覧表示
プルリクエスト: プルリクエストの作成、表示、一覧表示、更新(コメントの読み取りや追加を含む)
プロジェクト: プロジェクト詳細の表示とデフォルトのレビュアーの一覧表示
ブランチ制限: プロジェクトおよびリポジトリのブランチ制限を管理
コミット: 個別のコミットやコミットリストを取得
Related MCP server: JIRA MCP Server
前提条件
Node.js 18 以上
npm または yarn
Bitbucket Cloud アカウント
Bitbucket アプリパスワード(認証用)
セットアップ
1. 依存関係のインストール
npm install2. プロジェクトのビルド
npm run build3. Atlassian API トークンの作成*
Jira や Confluence のトークンを既にお持ちの場合は、それを再利用できます *
Bitbucket アカウント設定に移動
「アクセス管理」の下にある「アプリパスワード」に移動
「アプリパスワードを作成」をクリックするのではなく(古い方法です)、「API トークンに移動」を選択
API トークンを作成
分かりやすい名前を付ける(例: "Cursor MCP Integration")
有効期限を選択
生成されたトークンをコピー
4. 環境変数の設定
プロジェクトのルートに .env ファイルを作成します:
BITBUCKET_USERNAME=your_bitbucket_email_address
BITBUCKET_APP_PASSWORD=your_api_token
BITBUCKET_WORKSPACE=your_workspace_name注意: ワークスペース名は通常、ユーザー名または組織名です。Bitbucket の URL(例: https://bitbucket.org/workspace_name/)から確認できます。
5. Cursor MCP 設定への追加
Cursor の MCP 設定に以下の設定を追加します:
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": ["@korfu/bitbucket-mcp"],
"env": {
"BITBUCKET_USERNAME": "your_bitbucket_email_address",
"BITBUCKET_APP_PASSWORD": "your_api_token",
"BITBUCKET_WORKSPACE": "your_workspace_name"
}
}
}
}6. Cursor の再起動
設定を追加した後、Cursor IDE を再起動して MCP サーバーを読み込みます。
使用方法
設定が完了すると、Cursor で以下のツールを使用できます:
ワークスペース
bitbucket_list_workspaces
リポジトリ
bitbucket_list_repositoriesbitbucket_get_repository_details
コミット
bitbucket_list_commitsbitbucket_get_commit
プルリクエスト
bitbucket_list_pull_requestsbitbucket_get_pull_requestbitbucket_create_pull_requestbitbucket_update_pull_requestbitbucket_list_pull_request_commentsbitbucket_get_pull_request_commentbitbucket_add_pull_request_comment
プロジェクト
bitbucket_get_projectbitbucket_list_default_reviewers
ブランチ制限
bitbucket_list_branch_restrictionsbitbucket_get_branch_restrictionbitbucket_update_repository_branching_model_settingsbitbucket_update_project_branching_model_settings
利用可能なツール
ワークスペース
list_workspaces: 現在のユーザーがアクセス可能なすべてのワークスペースを一覧表示します。
リポジトリ
list_repositories: 設定された Bitbucket ワークスペース内のすべてのリポジトリを一覧表示します。
get_repository_details: 最新のコミット情報を含む、特定のリポジトリの詳細情報を取得します。
コミット
list_commits: 特定のリポジトリのコミット情報を取得します。
get_commit: ハッシュを指定して単一のコミットを取得します。
プルリクエスト
list_pull_requests: リポジトリ内のすべてのプルリクエストを一覧表示します。
get_pull_request: ID を指定して単一のプルリクエストを取得します。
create_pull_request: 新しいプルリクエストを作成します。 //ベータ版 - 未テスト
update_pull_request: 既存のプルリクエストを更新します。 //ベータ版 - 未テスト
list_pull_request_comments: プルリクエストに対するすべてのコメント(グローバル、インライン、返信)をページネーション付きで一覧表示します。
get_pull_request_comment: ID を指定してプルリクエストの単一コメントを取得します(インラインのファイル/行コンテキストを含む)。
add_pull_request_comment: プルリクエストにコメントを追加します。一般的なコメント、特定のファイル/行へのインラインコメント、スレッド形式の返信をサポートしています。
プロジェクト
get_project: キーを指定して単一のプロジェクトを取得します。
list_default_reviewers: プロジェクトのデフォルトのレビュアーを一覧表示します。
ブランチ制限
list_branch_restrictions: リポジトリのすべてのブランチ制限を一覧表示します。
get_branch_restriction: ID を指定して単一のブランチ制限を取得します。
update_repository_branching_model_settings: リポジトリのブランチモデル設定を更新します。 //ベータ版 - 未テスト
update_project_branching_model_settings: プロジェクトのブランチモデル設定を更新します。 //ベータ版 - 未テスト
開発
開発モードでの実行
npm run devビルド
npm run buildプロジェクト構造
BitbucketMCP/
├── src/
│ └── index.ts # Main MCP server implementation
├── dist/ # Compiled JavaScript output
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── .gitignore # Git ignore rules
└── README.md # This fileトラブルシューティング
認証の問題
Bitbucket のユーザー名とアプリパスワードが正しいか確認してください
アプリパスワードに正しい権限(Repositories: Read)があることを確認してください
ワークスペース名が正しいか確認してください
接続の問題
インターネット接続を確認してください
ネットワークから Bitbucket API にアクセスできるか確認してください
MCP サーバーが実行されているか確認してください(Cursor の MCP ログを確認)
リポジトリが見つからない場合
リポジトリ名が正しいか確認してください(表示名ではなくリポジトリスラッグを使用してください)
リポジトリへのアクセス権があることを確認してください
指定したワークスペースにリポジトリが存在することを確認してください
MCP サーバーが読み込まれない場合
Cursor 設定内の
dist/index.jsへのパスが正しいか確認してくださいNode.js がインストールされており、コマンドラインからアクセス可能であることを確認してください
Cursor の MCP サーバーログでエラーメッセージを確認してください
セキュリティ上の注意
Bitbucket のアプリパスワードは安全に保管し、バージョン管理には決してコミットしないでください
資格情報には環境変数または安全な構成管理を使用してください
アプリパスワードには、必要な最小限の権限のみを付与してください
アプリパスワードを定期的にローテーションすることを検討してください
貢献
リポジトリをフォーク
フィーチャーブランチを作成
変更を加える
必要に応じてテストを追加
プルリクエストを送信
ライセンス
MIT ライセンス - 詳細は LICENSE ファイルを参照してください
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA Model Context Protocol server that enables seamless integration between Cursor IDE and JIRA, allowing users to retrieve issues, execute JQL searches, and log work through natural language interactions.
- AlicenseBqualityDmaintenanceA Model Context Protocol server that integrates JIRA directly into Cursor IDE, allowing users to view assigned issues, get detailed information on specific tickets, and convert JIRA issues into local tasks without leaving their editor.14236TypeScriptMIT
- AlicenseDqualityDmaintenanceA Model Context Protocol server that enables AI assistants to interact with Bitbucket repositories, pull requests, and other resources through Bitbucket Cloud and Server APIs.33,985161MIT
- AlicenseBqualityDmaintenanceAn MCP server that enables interaction with Bitbucket repositories through the Model Context Protocol, supporting both Bitbucket Cloud and Server with features for PR lifecycle management and code review.194,62827MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
A MCP server built for developers enabling Git based project management with project and personal…
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Korfu/mcp-bitbucket'
If you have feedback or need assistance with the MCP directory API, please join our Discord server