Bitbucket
Hostet Bitbucket Cloud MCP til Claude, ChatGPT og Cursor. Pull request-diffs, branch-sammenligninger, pipeline-status og review-kommentarer via MCP.
Overblik
Giv AI adgang til Bitbucket Cloud-repositories, pull requests, branch-diffs, filindhold og review-kommentarer. Denne Bitbucket MCP-integration hjælper code review-agenter med at besvare spørgsmål om PR'er, branches og pipelines uden at klone repositories lokalt.
Almindelige anvendelser:
- Bitbucket pull request MCP-værktøjer — opsummér diffs, list reviewers og sammenlign branches.
- Forbind Bitbucket til Cursor eller Claude — inspicér
src/App.phppådevelopeller tjek pipeline-status fra chat. - Private gateway — kombinér Bitbucket med GitHub, Forge og andre dev-værktøjer i én MCP-session.
Forudsætninger
- En Bitbucket Cloud-konto (
bitbucket.org) - En stackgate.ai-konto
Credentials
For hub-operatører (OAuth-app)
- I Bitbucket, åbn Workspace settings → Apps and features → OAuth consumers.
- Klik Add consumer og sæt Callback URL til din hub-URL plus
/oauth/bitbucket/callback(for eksempelhttps://stackgate.ai/oauth/bitbucket/callback). - Giv Read-adgang til Repositories, Pull requests og Pipelines.
- Kopiér Key og Secret til hub-miljøvariabler:
BITBUCKET_CLIENT_IDBITBUCKET_CLIENT_SECRETBITBUCKET_INTEGRATION_REDIRECT_URI(skal matche callback-URL'en præcist)
For slutbrugere
- Gå til Mine integrationer → Bitbucket.
- Klik Aktivér, og derefter Forbind Bitbucket.
- Godkend stackgate.ai via Bitbucket OAuth.
Brug med AI-klienter
- Dedikeret endpoint:
POST /mcp/bitbucket - Private gateway:
bitbucket__*-værktøjer
Se Dokumentation for HTTP-autentificering og opsætning af private gateway.
Typiske spørgsmål du kan stille:
- Hvad ændrede sig i pull request 42 i repo
my-repo? - Hvordan ser
src/App.phpud på branchdevelop? - Hvornår var det seneste commit på
main? - Hvad er diffs mellem
mainogfeature/login? - Hvem godkendte pull request 42?
- Er pipelinen færdig på branch
develop? - Hvad fejlede i den seneste pipeline på
feature/login?
Fejlfinding
- 403 from Bitbucket — tokenet mangler muligvis adgang til et privat repository; genforbind og bekræft workspace-medlemskab.
- 403 on pipeline tools — genforbind efter at have givet Pipelines read-adgang (klassisk OAuth) eller
read:pipeline:bitbucket(Atlassian OAuth-app). - 401 / expired token — genforbind Bitbucket i Mine integrationer (access tokens udløber efter ca. en time; refresh tokens gemmes automatisk når tilgængelige).
- Empty PR diff — Bitbucket omdirigerer diff-forespørgsler; sørg for at
workspaceer workspace-sluggen, ikke visningsnavnet. - Rate limits — Bitbucket OAuth app rate limits gælder pr. forbundet konto.
- Pipeline-værktøjer — kræver Pipelines OAuth-tilladelse. Hvis du forbandt før dette blev tilføjet, afbryd og genforbind Bitbucket i Mine integrationer. For Atlassian Developer Console OAuth-apps, aktiver
read:pipeline:bitbucket-scope i app-indstillingerne, og genforbind derefter.
Tilgængelige værktøjer
-
add_pull_request_comment
Add a comment or reply on a Bitbucket pull request. Pass parent_id to reply to an existing comment.
-
compare_branches_diffstat
Get file-level diff stats between two branches or commits (e.g. main..feature).
-
compare_branches_diff
Get the raw unified diff between two branches or commits (e.g. main..feature).
-
get_branch_pipeline_failure_logs
Fetch failure logs from the latest failed Bitbucket Pipelines run on a branch to diagnose build errors.
-
get_branch_pipeline_status
Get the latest Bitbucket Pipelines run status for a branch — running, successful, failed, or not found.
-
get_file_contents
Get file contents from a Bitbucket repository at a path and optional ref (branch or commit).
-
get_me
Get the connected Bitbucket account profile.
-
get_pull_request_diff
Get the raw unified diff for a Bitbucket pull request. Large diffs are truncated.
-
get_pull_request
Get a Bitbucket pull request including state, reviewers, and approval status.
-
list_branches
List branches in a Bitbucket repository.
-
list_commits
List commits on a Bitbucket branch or revision. Use pagelen=1 for the latest commit.
-
list_pull_request_activity
List activity on a Bitbucket pull request including approvals, reviews, and comments.
-
list_pull_request_comments
List comments on a Bitbucket pull request, including reply thread IDs.
-
list_pull_request_diffstat
List file-level changes in a Bitbucket pull request (diffstat).
-
list_pull_requests
List pull requests in a Bitbucket repository.
-
list_repos
List repositories in a Bitbucket workspace.
-
list_workspaces
List Bitbucket workspaces accessible to the connected account.
MCP-endpoint:
https://stackgate.ai/mcp/bitbucket
(HTTP) eller via
private gateway.