Bitbucket Data Center integration
Work with a self-managed Bitbucket Data Center (or Server) instance: browse projects, repositories, branches, tags, commits, file paths and structured diffs; open, update, review, approve, merge or decline pull requests, comment on them and add tasks; and report CI results back as build statuses, deployments and Code Insights reports with annotations. Every call acts with the permissions of the credential's user or token scope. Not exposed: user, group and permission administration, SSH and GPG keys, access tokens, webhooks, repository hooks and hook scripts, branch permissions and merge-check settings, mirroring, system maintenance and indexing, secret scanning, attachments and archives, file editing, reading raw file contents, raw text diffs and patches, repository labels, forking, watching, reviewer groups and repository or pull request settings, comment and task edits or deletion, pull request deletion, and repository or project deletion; user email addresses are not returned. For Bitbucket Cloud use the Bitbucket integration instead. Authentication: HTTP Basic with your Bitbucket username and a personal HTTP access token (or password), or a project or repository HTTP access token sent as a Bearer token; plus the base URL of your instance. Project and repository tokens cannot merge pull requests.
Say what should happen.
The workflow builds itself.
What you can do with Bitbucket Data Center
Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.
Each badge shows the default agent permission of an endpoint (allowed: an agent calls it without asking; ask first: you are asked before an agent calls it, when the agent or chat asks permission for sensitive actions; never: no agent may call it), which every user can change endpoint by endpoint in their credential settings.
Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.
Pull request, 6 operations
create_pull_requestCreate pull requestPOSTAgents: ask firstOpens a pull request from fromRef to toRef with a title, optional description, reviewers and draft flag. Reviewers are notified. Acts on the real Bitbucket instance.get_pull_requestGet pull requestGETAgents: ask firstReturns one pull request: title, description, state, draft flag, source and target refs, author, reviewers and their approval status, and its version.list_commit_pull_requestsList commit pull requestsGETAgents: ask firstLists the pull requests of the repository that contain the given commit. Paged (start, limit): pass nextPageStart as start while isLastPage is false.list_my_pull_requestsList my pull requestsGETAgents: ask firstLists the pull requests the authenticated user is involved in (author, reviewer or participant), filtered by role, state and participant status. Paged (start, limit): pass nextPageStart as start while isLastPage is false.list_pull_requestsList pull requestsGETAgents: ask firstLists the pull requests of a repository, OPEN by default (state ALL for every state), filtered by branch, draft status or text in title and description. Paged (start, limit): pass nextPageStart as start while isLastPage is false.update_pull_requestUpdate pull requestPUTAgents: ask firstUpdates a pull request's title, description, reviewers, target branch or draft flag. Send the current version from get_pull_request. Notifies participants. Acts on the real Bitbucket instance.
Commit, 5 operations
compare_commitsCompare commitsGETAgents: ask firstLists the commits reachable from from but not from to (for example a branch against main). Paged (start, limit): pass nextPageStart as start while isLastPage is false.get_commitGet commitGETAgents: ask firstReturns one commit by ID (SHA1 or ref name): author and committer names, timestamps, message and parents.list_commitsList commitsGETAgents: ask firstLists commits newest first, from until (default branch when left out) back to since, optionally only those touching path. Paged (start, limit): pass nextPageStart as start while isLastPage is false.list_issue_commitsList issue commitsGETAgents: ask firstLists the commits whose messages mention a Jira issue key, across repositories. Paged (start, limit): pass nextPageStart as start while isLastPage is false.list_pull_request_commitsList pull request commitsGETAgents: ask firstLists the commits of a pull request. Paged (start, limit): pass nextPageStart as start while isLastPage is false.
Repo, 5 operations
create_repositoryCreate repositoryPOSTAgents: ask firstCreates a new Git repository in a project (needs PROJECT_ADMIN on it). Send name; slug is derived from it unless given. Acts on the real Bitbucket instance.get_repositoryGet repositoryGETAgents: ask firstReturns one repository: slug, name, description, state, public and forkable flags, archived status and its project.list_project_repositoriesList project repositoriesGETAgents: ask firstLists the repositories of one project that the credential can read. Paged (start, limit): pass nextPageStart as start while isLastPage is false.list_recent_repositoriesList recent repositoriesGETAgents: ask firstLists the repositories the authenticated user accessed most recently, newest first. Paged (start, limit): pass nextPageStart as start while isLastPage is false.search_repositoriesSearch repositoriesGETAgents: ask firstSearches the repositories the credential can read across all projects, by name, project name or key, visibility, permission, state or archived status. Paged (start, limit): pass nextPageStart as start while isLastPage is false.
Change, 4 operations
compare_changesCompare changesGETAgents: ask firstLists the files changed between from and to. Paged (start, limit): pass nextPageStart as start while isLastPage is false.list_changesList changesGETAgents: ask firstLists the files changed by until, compared with since or its first parent. Paged (start, limit): pass nextPageStart as start while isLastPage is false.list_commit_changesList commit changesGETAgents: ask firstLists the files a commit changed (path, type such as ADD, MODIFY, DELETE, MOVE), compared with its parent or with since. Paged (start, limit): pass nextPageStart as start while isLastPage is false.list_pull_request_changesList pull request changesGETAgents: ask firstLists the files a pull request changes (path and change type). Returns a single page: start is ignored, and the list is cut to limit or to a server maximum (isLastPage false means it was cut).
Comment, 4 operations
create_commit_commentCreate commit commentPOSTAgents: ask firstAdds a general comment (text) to a commit. Participants are notified. Acts on the real Bitbucket instance.create_pull_request_commentCreate pull request commentPOSTAgents: ask firstAdds a general comment (text) to a pull request; severity BLOCKER makes it a task. Participants are notified. Acts on the real Bitbucket instance.get_pull_request_commentGet pull request commentGETAgents: ask firstReturns one pull request comment: text, author, severity, state, thread resolution and its version.list_commit_commentsList commit commentsGETAgents: ask firstLists the discussion comments on a commit, optionally only those on one file path. Paged (start, limit): pass nextPageStart as start while isLastPage is false.
Participant, 4 operations
add_pull_request_reviewerAdd pull request reviewerPOSTAgents: ask firstAdds a user to a pull request as a REVIEWER (user.name is the user name). The reviewer is notified. Acts on the real Bitbucket instance.list_pull_request_participantsList pull request participantsGETAgents: ask firstLists the participants of a pull request with their role (AUTHOR, REVIEWER, PARTICIPANT) and approval status. Paged (start, limit): pass nextPageStart as start while isLastPage is false.remove_pull_request_reviewerRemove pull request reviewerDELETEAgents: ask firstRemoves the REVIEWER role from a user on a pull request; they stay a participant. Acts on the real Bitbucket instance.set_pull_request_review_statusSet pull request review statusPUTAgents: ask firstSets the authenticated user's review status on a pull request: APPROVED, NEEDS_WORK or UNAPPROVED. userSlug must be that user's own slug. Acts on the real Bitbucket instance.
Annotation, 3 operations
add_report_annotationsAdd report annotationsPOSTAgents: ask firstAdds annotations (path, line, message, severity, type) to an existing Code Insights report; a report holds at most 1000 annotations. Acts on the real Bitbucket instance.list_commit_annotationsList commit annotationsGETAgents: ask firstLists the Code Insights annotations on a commit, filtered by report key, path, severity, type or external ID.list_report_annotationsList report annotationsGETAgents: ask firstLists the annotations of one Code Insights report.
Blocker comment, 3 operations
create_pull_request_taskCreate pull request taskPOSTAgents: ask firstAdds a blocker comment (task) to a pull request; it must be resolved before merging when the repository requires it. Acts on the real Bitbucket instance.get_pull_request_taskGet pull request taskGETAgents: ask firstReturns one blocker comment (task) of a pull request: text, author, state and version.list_pull_request_tasksList pull request tasksGETAgents: ask firstLists the blocker comments (tasks) of a pull request, optionally only those in given states (OPEN, RESOLVED). Paged (start, limit): pass nextPageStart as start while isLastPage is false.
Branch, 3 operations
create_branchCreate branchPOSTAgents: ask firstCreates a branch named name at startPoint (a commit ID or an existing branch or tag). Needs REPO_WRITE. Acts on the real Bitbucket instance.delete_branchDelete branchDELETEAgents: ask firstDeletes a branch (pass dryRun=true to only check). Deleting a branch that does not exist raises no error. Needs REPO_WRITE. Acts on the real Bitbucket instance.list_branchesList branchesGETAgents: ask firstLists the branches of a repository, filtered by filterText and ordered ALPHABETICAL or MODIFICATION. Paged (start, limit): pass nextPageStart as start while isLastPage is false.
Report, 3 operations
get_insight_reportGet insight reportGETAgents: ask firstReturns one Code Insights report on a commit by its key: title, result, details, data fields and link.list_insight_reportsList insight reportsGETAgents: ask firstLists the Code Insights reports on a commit. Paged (start, limit): pass nextPageStart as start while isLastPage is false.set_insight_reportSet insight reportPUTAgents: ask firstCreates a Code Insights report on a commit, or replaces the report with the same key (title and data required). Acts on the real Bitbucket instance.
Tag, 3 operations
create_tagCreate tagPOSTAgents: ask firstCreates a tag named name at startPoint (a commit ID or a branch), annotated when a message is given. Needs REPO_WRITE. Acts on the real Bitbucket instance.get_tagGet tagGETAgents: ask firstReturns one tag by name: its ref ID, display ID and the commit it points to.list_tagsList tagsGETAgents: ask firstLists the tags of a repository, filtered by filterText and ordered ALPHABETICAL or MODIFICATION. Paged (start, limit): pass nextPageStart as start while isLastPage is false.
Build, 2 operations
get_build_statusGet build statusGETAgents: ask firstReturns the build status with the given key on a commit: state, name, URL, build number, duration and test results.set_build_statusSet build statusPOSTAgents: ask firstStores the status of a CI build (key, state, url) on a commit; it shows on the commit and its pull requests and can gate merges. Acts on the real Bitbucket instance.
Deployment, 2 operations
get_deploymentGet deploymentGETAgents: ask firstReturns the deployment of a commit with the given key, environmentKey and deploymentSequenceNumber.set_deploymentSet deploymentPOSTAgents: ask firstCreates or updates a deployment record of a commit to an environment (key, state, url, environment). Acts on the real Bitbucket instance.
Diff, 2 operations
get_commit_diffGet commit diffGETAgents: ask firstReturns the structured diff (hunks, segments, lines) of one file path at a commit, against its parent or since.get_pull_request_diffGet pull request diffGETAgents: ask firstReturns the structured diff (hunks, segments, lines) of one file path in a pull request.
File, 2 operations
list_directory_filesList directory filesGETAgents: ask firstLists every file path under one directory at a revision (at), recursively. Paged (start, limit): pass nextPageStart as start while isLastPage is false.list_filesList filesGETAgents: ask firstLists every file path of the repository at a revision (at, default branch when left out), recursively. Paged (start, limit): pass nextPageStart as start while isLastPage is false.
Merge, 2 operations
check_pull_request_mergeableCheck pull request mergeableGETAgents: ask firstTests whether a pull request can be merged now: canMerge, conflicted, and the merge check vetoes that block it.merge_pull_requestMerge pull requestPOSTAgents: ask firstMerges a pull request into its target branch now (or sets it to auto-merge with autoMerge=true). Send the current version. Needs REPO_WRITE and the Basic variant (a project or repository token cannot merge). Acts on the real Bitbucket instance.
Project, 2 operations
get_projectGet projectGETAgents: ask firstReturns one project by its key: name, description, type and whether it is public.list_projectsList projectsGETAgents: ask firstLists the projects the credential can see (PROJECT_VIEW), optionally filtered by name or by a permission the user holds on them. Paged (start, limit): pass nextPageStart as start while isLastPage is false.
Activity, 1 operation
list_pull_request_activitiesList pull request activitiesGETAgents: ask firstLists the activity of a pull request newest first: comments, approvals, reviews, rescopes, merges and declines. Paged (start, limit): pass nextPageStart as start while isLastPage is false.
Commit message suggestion, 1 operation
get_pull_request_commit_messageGet pull request commit messageGETAgents: ask firstReturns the commit message Bitbucket suggests for merging a pull request.
Decline, 1 operation
decline_pull_requestDecline pull requestPOSTAgents: ask firstDeclines an open pull request, with an optional comment. Send the current version from get_pull_request. Acts on the real Bitbucket instance.
Fork, 1 operation
list_repository_forksList repository forksGETAgents: ask firstLists the repositories forked from this one. Paged (start, limit): pass nextPageStart as start while isLastPage is false.
Info, 1 operation
list_branches_containing_commitList branches containing commitGETAgents: ask firstLists the branches of a repository that contain the given commit. Paged (start, limit): pass nextPageStart as start while isLastPage is false.
Issue, 1 operation
list_pull_request_issuesList pull request issuesGETAgents: ask firstLists the Jira issue keys mentioned by the commits of a pull request.
Merge base, 1 operation
get_pull_request_merge_baseGet pull request merge baseGETAgents: ask firstReturns the best common ancestor commit of a pull request's source and target branches.
Reopen, 1 operation
reopen_pull_requestReopen pull requestPOSTAgents: ask firstReopens a declined pull request. Send the current version from get_pull_request. Acts on the real Bitbucket instance.
Stats, 1 operation
get_build_status_countsGet build status countsGETAgents: ask firstReturns how many builds on a commit are successful, in progress, failed, cancelled or unknown.
Use Bitbucket Data Center from Claude Code, Cursor or Codex
Connect Bitbucket Data Center in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its Bitbucket Data Center operations become tools the client can call, next to every other integration you connected.
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"
[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"{
"mcpServers": {
"livecontext": {
"type": "http",
"url": "https://livecontext.ai/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}How to connect Bitbucket Data Center
- Create your workspace
Sign up free. Nothing to install.
- Connect Bitbucket Data Center once
Add your Bitbucket Data Center connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.
- Describe the job in chat
The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.
Bitbucket Data Center integration FAQ
What can you do with the Bitbucket Data Center integration?
LiveContext exposes 64 operations on Bitbucket Data Center, covering pull request, commit, repo and change.
