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.
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 requestPOSTOpens 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 requestGETReturns 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 requestsGETLists 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 requestsGETLists 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 requestsGETLists 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 requestPUTUpdates 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 commitsGETLists 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 commitGETReturns one commit by ID (SHA1 or ref name): author and committer names, timestamps, message and parents.list_commitsList commitsGETLists 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 commitsGETLists 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 commitsGETLists the commits of a pull request. Paged (start, limit): pass nextPageStart as start while isLastPage is false.
Repo, 5 operations
create_repositoryCreate repositoryPOSTCreates 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 repositoryGETReturns one repository: slug, name, description, state, public and forkable flags, archived status and its project.list_project_repositoriesList project repositoriesGETLists 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 repositoriesGETLists the repositories the authenticated user accessed most recently, newest first. Paged (start, limit): pass nextPageStart as start while isLastPage is false.search_repositoriesSearch repositoriesGETSearches 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 changesGETLists the files changed between from and to. Paged (start, limit): pass nextPageStart as start while isLastPage is false.list_changesList changesGETLists 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 changesGETLists 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 changesGETLists 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 commentPOSTAdds a general comment (text) to a commit. Participants are notified. Acts on the real Bitbucket instance.create_pull_request_commentCreate pull request commentPOSTAdds 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 commentGETReturns one pull request comment: text, author, severity, state, thread resolution and its version.list_commit_commentsList commit commentsGETLists 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 reviewerPOSTAdds 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 participantsGETLists 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 reviewerDELETERemoves 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 statusPUTSets 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 annotationsPOSTAdds 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 annotationsGETLists the Code Insights annotations on a commit, filtered by report key, path, severity, type or external ID.list_report_annotationsList report annotationsGETLists the annotations of one Code Insights report.
Blocker comment, 3 operations
create_pull_request_taskCreate pull request taskPOSTAdds 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 taskGETReturns one blocker comment (task) of a pull request: text, author, state and version.list_pull_request_tasksList pull request tasksGETLists 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 branchPOSTCreates 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 branchDELETEDeletes 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 branchesGETLists 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 reportGETReturns one Code Insights report on a commit by its key: title, result, details, data fields and link.list_insight_reportsList insight reportsGETLists the Code Insights reports on a commit. Paged (start, limit): pass nextPageStart as start while isLastPage is false.set_insight_reportSet insight reportPUTCreates 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 tagPOSTCreates 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 tagGETReturns one tag by name: its ref ID, display ID and the commit it points to.list_tagsList tagsGETLists 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 statusGETReturns the build status with the given key on a commit: state, name, URL, build number, duration and test results.set_build_statusSet build statusPOSTStores 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 deploymentGETReturns the deployment of a commit with the given key, environmentKey and deploymentSequenceNumber.set_deploymentSet deploymentPOSTCreates 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 diffGETReturns the structured diff (hunks, segments, lines) of one file path at a commit, against its parent or since.get_pull_request_diffGet pull request diffGETReturns the structured diff (hunks, segments, lines) of one file path in a pull request.
File, 2 operations
list_directory_filesList directory filesGETLists every file path under one directory at a revision (at), recursively. Paged (start, limit): pass nextPageStart as start while isLastPage is false.list_filesList filesGETLists 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 mergeableGETTests whether a pull request can be merged now: canMerge, conflicted, and the merge check vetoes that block it.merge_pull_requestMerge pull requestPOSTMerges 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 projectGETReturns one project by its key: name, description, type and whether it is public.list_projectsList projectsGETLists 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 activitiesGETLists 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 messageGETReturns the commit message Bitbucket suggests for merging a pull request.
Decline, 1 operation
decline_pull_requestDecline pull requestPOSTDeclines 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 forksGETLists 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 commitGETLists 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 issuesGETLists the Jira issue keys mentioned by the commits of a pull request.
Merge base, 1 operation
get_pull_request_merge_baseGet pull request merge baseGETReturns the best common ancestor commit of a pull request's source and target branches.
Reopen, 1 operation
reopen_pull_requestReopen pull requestPOSTReopens 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 countsGETReturns 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.
