Bitbucket MCP
Bitbucket Cloud用のModel Context Protocol (MCP)サーバーです。AIアシスタントがリポジトリ、プルリクエスト、パイプラインなどを管理できるようにします。
インストール
オプション 1: npxを使用する (推奨)
インストールは不要です。直接実行してください:
npx @icy-r/bitbucket-mcpオプション 2: グローバルインストール
npm install -g @icy-r/bitbucket-mcp
bitbucket-mcpオプション 3: ローカル開発
git clone https://github.com/icy-r/bitbucket-mcp.git
cd bitbucket-mcp
pnpm install
pnpm build
node dist/index.jsRelated MCP server: Atlassian Bitbucket MCP Server
MCPクライアントの設定
Cursor IDE
CursorのMCP設定(Windowsの場合は ~/.cursor/mcp.json、%USERPROFILE%\.cursor\mcp.json)に追加します:
npxを使用する場合 (推奨):
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": ["-y", "@icy-r/bitbucket-mcp"],
"env": {
"BITBUCKET_AUTH_METHOD": "api_token",
"BITBUCKET_USER_EMAIL": "your.email@example.com",
"BITBUCKET_API_TOKEN": "your_api_token"
}
}
}
}ローカルビルドを使用する場合:
{
"mcpServers": {
"bitbucket": {
"command": "node",
"args": ["D:\\path\\to\\bitbucket-mcp\\dist\\index.js"],
"env": {
"BITBUCKET_AUTH_METHOD": "api_token",
"BITBUCKET_USER_EMAIL": "your.email@example.com",
"BITBUCKET_API_TOKEN": "your_api_token"
}
}
}
}Claude Desktop
Claude Desktopの設定(macOSの場合は ~/Library/Application Support/Claude/claude_desktop_config.json、Windowsの場合は %APPDATA%\Claude\claude_desktop_config.json)に追加します:
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": ["-y", "@icy-r/bitbucket-mcp"],
"env": {
"BITBUCKET_AUTH_METHOD": "api_token",
"BITBUCKET_USER_EMAIL": "your.email@example.com",
"BITBUCKET_API_TOKEN": "your_api_token"
}
}
}
}その他のMCPクライアント
このサーバーはMCP標準に準拠しており、互換性のあるすべてのクライアントで動作します。上記の構成パターンを使用し、プラットフォームに合わせてパスを調整してください。
認証
APIトークン (推奨)
Bitbucket APIトークン にアクセスします
必要な権限を持つ新しいトークンを作成します
環境変数を設定します:
BITBUCKET_AUTH_METHOD=api_token
BITBUCKET_USER_EMAIL=your.email@example.com
BITBUCKET_API_TOKEN=your_api_tokenアプリパスワード
Bitbucketアプリパスワード にアクセスします
必要な権限を持つ新しいアプリパスワードを作成します
ユーザー名とアプリパスワードを使用して
basic認証メソッドを使用します
環境変数
変数名 | 説明 | 必須 |
|
| はい |
| Atlassianのメールアドレス | api_token用 |
| APIトークン | api_token用 |
| Bitbucketユーザー名 | basic認証用 |
| アプリパスワード | basic認証用 |
| デフォルトのワークスペース(ツール呼び出しで | いいえ |
|
| いいえ |
利用可能なツール
ツール | アクション |
| list, get, list_projects, list_members |
| list, get, create, delete, fork, get_file, list_source |
| list, get, create, update, merge, approve, unapprove, decline, list_comments, add_comment, get_diff |
| list_branches, get_branch, create_branch, delete_branch, list_tags, get_tag, create_tag |
| list, get, get_diff, get_diffstat |
| list, get, trigger, trigger_custom, stop, list_steps, get_step, get_logs, get_config, set_enabled, list_variables, get_variable, create_variable, update_variable, delete_variable |
| list, get, create, update, delete, list_comments, add_comment, vote, unvote, watch, unwatch |
| list, get, create, update, delete, list_workspace, get_workspace, create_workspace, update_workspace, delete_workspace |
出力フォーマット
format パラメータでレスポンスの冗長性を制御します:
フォーマット | 説明 | トークン削減率 |
| 完全なJSON出力 | 0% |
| コンパクトなTOON形式 | ~50% |
| 必須フィールドのみ | ~76% |
使用例:
{ "action": "list", "workspace": "my-workspace", "format": "compact" }例
ワークスペース内のリポジトリを一覧表示
{
"action": "list",
"workspace": "my-workspace"
}プルリクエストを作成
{
"action": "create",
"workspace": "my-workspace",
"repo_slug": "my-repo",
"title": "Feature: Add new functionality",
"source_branch": "feature/new-feature",
"destination_branch": "main"
}パイプラインをトリガー
{
"action": "trigger",
"workspace": "my-workspace",
"repo_slug": "my-repo",
"branch_name": "main"
}デフォルトのワークスペース
環境変数に BITBUCKET_WORKSPACE を設定すると、すべてのツール呼び出しで workspace パラメータを省略できます:
{ "action": "list", "repo_slug": "my-repo" }開発
# Clone the repository
git clone https://github.com/icy-r/bitbucket-mcp.git
cd bitbucket-mcp
# Install dependencies
pnpm install
# Build
pnpm build
# Run tests
pnpm test
# Run in development mode (watch)
pnpm dev
# Lint and format
pnpm lint
pnpm format要件
Node.js >= 20.0.0
pnpm (開発用)
ライセンス
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/icy-r/bitbucket-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
