インストール不要。2分以内に動きます。
cloud.anythingmcp.com で無料トライアルを開始し、Bitbucket をワンクリックで追加して、AI クライアント(Claude、ChatGPT、Copilot、Cursor)を生成された MCP エンドポイントに向けるだけ。Docker も git clone も、開発経験も不要です。
概要
AI に Bitbucket Cloud で作業させます。リポジトリ、ブランチ、コミット、ファイルの閲覧、差分とコメントを含むプルリクエストのレビュー、あなたの確認後の承認、コメント、マージ、そして Bitbucket Pipelines の実行、ステップのログ、デプロイの確認ができます。
こう聞いてみよう
Bitbucket のサンプルプロンプト
プロンプトをクリックでコピー。Claude / ChatGPT / Cursor / Gemini / Copilot / OpenClaw に貼り付けて、このコネクターで実行できます。
Claude は AI のため誤ることがあります。回答をご確認ください。
💡 インストール不要? cloud.anythingmcp.com を直接利用してください。 サインインし、Connectors → Bitbucket をクリック、認証情報を貼り付け、MCP API キーを発行すれば完了です。Docker も
git cloneもローカルサーバーも不要。
Bitbucket + Cursor
AI に Bitbucket Cloud で作業させます。リポジトリ、ブランチ、コミット、ファイルの閲覧、差分とコメントを含むプルリクエストのレビュー、あなたの確認後の承認、コメント、マージ、そして Bitbucket Pipelines の実行、ステップのログ、デプロイの確認ができます。
前提条件
完全なセットアップ手順はコネクタ自体に組み込まれています (ストアでコネクタを選択すると表示)。必要な環境変数:
BITBUCKET_API_TOKEN
ステップ 1 — 認証情報を取得
https://id.atlassian.com/manage-profile/security/api-tokens(Atlassian アカウントの Security → API tokens)にサインインし、Create API token with scopes をクリックします。- トークンに名前(たとえば AnythingMCP)を付け、有効期限を選び、アプリとして Bitbucket を選択します。
- 読み取りスコープ
read:user:bitbucket、read:workspace:bitbucket、read:repository:bitbucket、read:pullrequest:bitbucket、read:pipeline:bitbucketにチェックを入れます。プルリクエストの作成、コメント、承認、マージにはwrite:pullrequest:bitbucketを、パイプラインの起動にはwrite:pipeline:bitbucketを追加します。 - トークン(
ATATTで始まります)をコピーし、Bearer という語を付けずにBITBUCKET_API_TOKENに貼り付けて、コネクタをインストールします。コネクタは Bearer トークンとして送信するため、Atlassian のメールアドレスは不要です。 bitbucket_get_current_user、続いてbitbucket_list_workspacesで設定を確認します。
アプリパスワードはもう使えません: Bitbucket は 2025 年 9 月 9 日にアプリパスワードの新規作成を停止し、残っていたものを 2026 年 7 月 28 日に無効にしました。上記のとおりスコープ付きの API トークンを使ってください。リポジトリ、プロジェクト、ワークスペースのアクセストークン(Repository settings → Access tokens。プロジェクトとワークスペースのトークンには Premium プランが必要です)も同じ欄で使えますが、そのリポジトリ、プロジェクト、ワークスペースに限定されたボットとして動作します。そのため bitbucket_get_current_user と bitbucket_list_workspaces が拒否されることがあり、範囲外のものには 403 または 404 が返ります。
誰が何を見られるか: AI はトークンの持ち主のユーザーとして動作し、そのユーザーとチェックしたスコープが許す範囲だけを閲覧、変更します。2 つの書き込みスコープを付けなければ、トークンは読み取り専用のままです。
実際のブランチを変更しチームにも届くため、AI は先に確認します: bitbucket_create_pull_request はあなたの名前でプルリクエストを作成します(ソースブランチはプッシュ済みである必要があります)。bitbucket_add_pull_request_comment は通常のコメント、返信、または行に対するコードコメントを投稿し、プルリクエストの参加者全員に表示され、通知が届くこともあります。bitbucket_approve_pull_request はあなたの承認を追加し、これはマージチェックに数えられます。bitbucket_merge_pull_request は全員にとってのマージ先ブランチを変更し、デプロイ用パイプラインを起動することがあり、close_source_branch を指定するとソースブランチを削除します。AI はその前に bitbucket_get_pull_request で状態と承認を確認します。bitbucket_run_pipeline はビルド時間を消費し、デプロイのステップも含めてパイプラインの処理をすべて実行します。AI はそれぞれの前に、リポジトリ、ブランチ、プルリクエスト、マージ方法またはパイプラインを示し、あなたの承認を待ちます。インストール時に無効になっているツールはありません。また、close_source_branch を指定したマージでのソースブランチを除き、リポジトリ、ブランチ、コメントを削除するツールはありません。
作業の進め方: bitbucket_list_workspaces でワークスペースのスラッグ、bitbucket_list_repositories でリポジトリのスラッグがわかります。どちらもアドレス bitbucket.org/<workspace>/<repo> に含まれています。コード: bitbucket_get_repository(メインブランチ)、bitbucket_list_branches、bitbucket_list_commits、bitbucket_get_commit、bitbucket_get_file(ファイルのテキストまたはフォルダの一覧)。レビュー: bitbucket_list_pull_requests、bitbucket_get_pull_request、変更の規模を見る bitbucket_get_pull_request_diffstat、続いて bitbucket_get_pull_request_diff、bitbucket_list_pull_request_commits、bitbucket_list_pull_request_comments。デプロイ: bitbucket_list_environments と bitbucket_list_deployments。
パイプライン: bitbucket_list_pipelines の後、失敗したステップについて bitbucket_get_pipeline、bitbucket_list_pipeline_steps、bitbucket_get_pipeline_step_log を使います。パイプラインとステップの uuid には波かっこが含まれます。AI は返された値をそのまま渡します。200 KB を超えるステップのログは先頭を残して切り詰められますが、エラーはたいてい末尾にあります。そのため長いログでは、AI は bytes=-150000(最後の 150 KB)のような範囲を指定して末尾を読みます。差分とファイルも 200 KB で切り詰められます。
一覧とフィルター: 次のページがある場合、一覧の応答には next が含まれます。AI は page(ほとんどの一覧では数値、コミットでは不透明なトークン)を付けて再度呼び出し、pagelen でページサイズを指定します。q には Bitbucket のクエリ言語を使えます。たとえば name ~ "api" や destination.branch.name = "main" です。
課題と Wiki はありません: Bitbucket は 2026 年 8 月 20 日に組み込みの課題トラッカーと Wiki を廃止しました(API は 410 を返します)。そのため、このコネクタにはそれらのツールがありません。課題管理には Jira コネクタを追加してください。
よくあるエラー: 401: トークンが間違っている、期限切れ、または取り消されている、あるいは古いアプリパスワードです。スコープ付きの API トークンを作成してください。403: スコープが不足している(メッセージにスコープ名が表示されます)か、ユーザーに権限がありません。404: ワークスペース、リポジトリ、または項目が存在しないか、トークンから見えません。429: 1 時間あたりのレート制限に達しました。少し待ってから再試行してください。
このコネクタは、リポジトリとブランチの作成や削除、ファイルの編集やコミットのプッシュ、プルリクエストの却下、パイプラインの停止、リポジトリの変数と設定、管理操作には対応していません。
ステップ 2 — アダプターをインストール
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
ステップ 3 — Cursor にコネクタを追加
サーバーURL: AnythingMCP で MCP Servers を開き、このコネクタがあるサーバーを選んで URL(
https://cloud.anythingmcp.com/mcp/…)をコピーします。このガイドでYOUR_SERVER_IDと表示されている箇所に使ってください。
Cursor は ~/.cursor/mcp.json から MCP サーバーを読み込みます。次のエントリを追加してください:
{
"mcpServers": {
"anythingmcp": {
"url": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- AnythingMCP の MCP Servers → 対象のサーバー → API keys で MCP API キーを作成し、
YOUR_MCP_API_KEYと置き換えます。 - ファイルを保存し、Cursor を再起動します。
- Cursor → Settings → MCP を開き、
anythingmcpが一覧にあり接続済みであることを確認します。 - チャットを始めましょう。エージェントが
Bitbucketのツールを呼び出せるようになりました。
利用可能なツール
| Tool | What it does |
|---|---|
bitbucket_get_current_user | Get the Bitbucket account the token belongs to: display name, nickname, uuid, account_id and profile link |
bitbucket_list_workspaces | List the workspaces the token's user belongs to: slug, name, uuid and whether the user is an administrator there |
bitbucket_list_repositories | List repositories in a workspace, most recently updated first: full_name, slug, description, private flag, language, main branch, project… |
bitbucket_get_repository | Get one repository: description, main branch, project, privacy, language, size, fork parent, clone URLs and web link |
bitbucket_list_branches | List branches of a repository with the latest commit of each (hash, date, message, author) |
bitbucket_list_commits | List commits newest first: hash, date, message, author and parents |
bitbucket_get_commit | Get one commit: full hash, date, full message, author, parents and web link |
bitbucket_get_file | Read a file or list a folder at a commit or branch |
bitbucket_list_pull_requests | List pull requests of a repository, open ones by default: id, title, state, draft, author, source and destination branch, comment and task… |
bitbucket_get_pull_request | Get one pull request: title, description, state, branches and commits, merge commit, reviewers and participants with their approval state… |
bitbucket_get_pull_request_diffstat | List the files a pull request changes: status (added, removed, modified, renamed), old and new path, lines added and removed |
bitbucket_get_pull_request_diff | Read the unified diff of a pull request as plain text |
bitbucket_list_pull_request_commits | List the commits a pull request contains, newest first: hash, date, message and author |
bitbucket_list_pull_request_comments | List comments on a pull request, oldest first: id, author, text, inline position (file and line) for code comments, parent id for replies… |
bitbucket_create_pull_request | Open a pull request from a source branch into a destination branch of the same repository, as the token's user |
bitbucket_add_pull_request_comment | Post a comment on a pull request as the token's user: a general comment, a reply (parent) or a code comment on a line (inline) |
bitbucket_approve_pull_request | Approve a pull request as the token's user |
bitbucket_merge_pull_request | Merge an open pull request into its destination branch |
bitbucket_list_pipelines | List Bitbucket Pipelines runs of a repository, newest first: uuid, build number, state (PENDING, IN_PROGRESS, COMPLETED), result… |
bitbucket_get_pipeline | Get one pipeline run: state, result, branch or tag, commit, custom pipeline name, trigger, creator, start, end and duration |
bitbucket_list_pipeline_steps | List the steps of a pipeline run: uuid, name, state, result, start, end, duration, build image name and script command names |
bitbucket_get_pipeline_step_log | Read the log of one pipeline step as plain text |
bitbucket_run_pipeline | Start a Bitbucket Pipelines run on a branch or tag, optionally a custom pipeline from bitbucket-pipelines.yml |
bitbucket_list_environments | List the deployment environments of a repository (for example Test, Staging, Production): uuid, name, type, rank and lock state |
bitbucket_list_deployments | List deployments of a repository: environment uuid, state (UNDEPLOYED, IN_PROGRESS, COMPLETED), status (SUCCESSFUL, FAILED, STOPPED), who… |
プロンプトの例
- 「acme/web-app でまだオープンになっているプルリクエストはどれですか?作成者と、まだ承認がないものを教えてください。」
- 「web-app のプルリクエスト #42 をレビューしてください。変更されたファイルを要約し、リスクのある変更を指摘し、未解決のレビューコメントを一覧にしてください。」
- 「main の最新のパイプラインはなぜ失敗したのですか?失敗したステップのログを読んで、エラーを見せてください。」
- 「プルリクエスト #42 に承認が 2 件付いたら、squash で main にマージしてください。先にブランチとマージ方法を見せて、マージする前に私に確認してください。」
- 「Production に最後にデプロイされたのはいつ、誰によってで、どのコミットがリリースされましたか?」
FAQ
Cursor の無料プランでカスタム MCP サーバーは使えますか? はい。MCP は Hobby、Pro、Business の各プランで利用できます。
次のステップ
このガイドは役に立ちましたか?