Skip to main content
Glama
bitbucket-mcp

bitbucket-mcp

by nevzatcirak

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
BITBUCKET_URLNoBase URL for Bitbucket Server/Data Center, without a trailing slash, e.g. `https://bitbucket.example.com`. Required for the `server` provider. For `cloud`, optional REST 2.0 base override; defaults to `https://api.bitbucket.org/2.0`.
BITBUCKET_TOKENNoToken authentication: Server/DC personal access token or Cloud OAuth/workspace token. Sent as `Authorization: Bearer`.
BITBUCKET_PASSWORDNoPassword or app password for Basic credential authentication; use together with `BITBUCKET_USERNAME`.
BITBUCKET_PROVIDERNoProvider to use: `server` (default, Bitbucket Server/Data Center) or `cloud` (Bitbucket Cloud REST 2.0).
BITBUCKET_USERNAMENoUsername for Basic credential authentication; use together with `BITBUCKET_PASSWORD`.
BITBUCKET_READ_ONLYNoSet to `true` to hide all write tools from the MCP client.
BITBUCKET_CLOUD_EMAILNoAtlassian account email for Bitbucket Cloud API token authentication; use together with `BITBUCKET_CLOUD_API_TOKEN`.
BITBUCKET_CUSTOM_HEADERSNoComma-separated `Name: Value` pairs appended to every request.
BITBUCKET_CLOUD_API_TOKENNoBitbucket Cloud API token; use together with `BITBUCKET_CLOUD_EMAIL`.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
bb_get_projectsA

List projects on the Bitbucket Server / Data Center instance. Supports an optional server-side name filter. Returns compact project cards with paging metadata (isLastPage / nextPageStart).

bb_get_projectA

Fetch a single project by key and return it as a compact card (key, name, description, visibility).

bb_get_repositoriesB

List repositories of a project as compact cards (slug, name, description, visibility). Optional server-side name filter. Returns paging metadata.

bb_get_repositoryA

Fetch a single repository by project key and slug. Returns a compact card including the HTTP clone URL.

bb_browse_repositoryA

Browse the default (or given) branch of a repository. Without 'path' lists the root directory; with a directory path lists entries; with a file path returns truncated content. Use this to explore the tree before fetching files.

bb_get_file_contentB

Fetch the raw content of a file from a repository (optionally at a specific branch/tag/commit). Long files are truncated with statistics.

bb_search_codeA

Full-text code search. On Server/DC supports Lucene modifiers: project:, repo:/, path:, ext:. On Cloud the search is workspace-scoped: 'project' selects the workspace (required), 'repo' narrows to one repository ('/'), path/ext modifiers are not supported.

bb_list_pull_requestsA

List pull requests of a repository. Filter by state (OPEN|MERGED|DECLINED|ALL), direction (INCOMING|OUTGOING) and optionally by author (client-side match on username or display name — paging metadata reflects unfiltered pages).

bb_get_pull_requestB

Fetch one pull request with description (truncated), branch pair, reviewers and their decisions as a compact card.

bb_get_pull_request_changesA

List the file-level changes of a pull request (added/modified/deleted paths).

bb_get_pull_request_diffA

Fetch the diff of a pull request (optionally for one file). Each file is compacted with smart truncation: head 60% + tail 40% of the preview budget, plus added/removed line counts and omission statistics.

bb_get_pull_request_buildsA

Fetch the CI build statuses attached to the pull request's source-branch head commit (build-state integration).

bb_get_pr_comments_and_actionsA

Read the review discussion of a pull request as threads: comment severity (NORMAL/BLOCKER), thread state (OPEN/RESOLVED) and action tasks. Resolved threads are hidden unless includeResolved=true. On Cloud severity is recognized from the '[BLOCKER]' text prefix written by bb_post_pull_request_comment.

bb_get_dashboard_pull_requestsA

List the pull requests of the authenticated user from the dashboard, filterable by role (AUTHOR|REVIEWER|PARTICIPANT) and state.

bb_get_inbox_pull_requestsA

List the pull requests in the authenticated user's inbox (things that need attention), newest activity first.

bb_get_userA

Look up a Bitbucket user. Pass userSlug for a direct lookup, or filter to search by name/email prefix (Server/DC only; on Cloud a call without userSlug returns the authenticated account).

bb_list_branchesA

List branches of a repository with default-branch detection (isDefault flag). Optional branch name filter (server-side on Server/DC, client-side on Cloud).

bb_list_commitsA

List commits of a repository (or a range with since/until). Optional client-side author filter on username or email — paging metadata reflects unfiltered pages.

bb_create_branchB

Create a branch in a repository, optionally from a specific start point (branch name, tag or commit). Refuses nothing server-side; default-branch protection applies only to deletion.

bb_delete_branchB

Delete a branch. Refuses with a structured DELETE_REFUSED error when the target is the repository's default branch.

bb_create_pull_requestA

Open a pull request. Supports forks via fromProjectKey/fromRepositorySlug. Tries the required-reviewers service first to pre-fill reviewers; if it is unavailable (400/404) the tool proceeds and notes that reviewers must be added manually.

bb_update_pull_requestA

Update title, description or target branch of a pull request. Server/DC uses optimistic locking (re-fetch + one retry on 409); Cloud has no version field and applies a single partial PUT.

bb_can_merge_pull_requestA

Read-only merge veto analysis for a pull request: canMerge, conflicted flag and the list of vetoes with summary/detail messages. On Cloud the analysis derives from the PR state and the conflicts pre-check (no server-side veto API).

bb_merge_pull_requestA

Merge a pull request with optional message and strategy (merge-commit | squash | fast-forward; translated to Cloud ids merge_commit | squash | fast_forward). On 409 (Server/DC) the merge is NOT retried automatically — a new commit likely landed; re-run canMerge then merge again.

bb_decline_pull_requestA

Decline (reject) a pull request. Server/DC: optional message, version taken from the current payload. Cloud: decline accepts no message — post a comment if a reason should be recorded.

bb_reopen_pull_requestA

Reopen a declined pull request. Uses optimistic locking: re-fetches the current version and retries once on a 409 conflict.

bb_post_pull_request_commentA

Post a comment on a pull request: PR-level, or inline with file+line (and startLine for multiline suggestion blocks). severity=BLOCKER additionally creates a follow-up task (on Cloud it also prefixes the text with '[BLOCKER]'). pending=true drafts the comment on Server/DC (rejected on Cloud — no draft support).

bb_update_pull_request_commentA

Update a comment's text or severity, resolve/unresolve its thread (state=RESOLVED|OPEN), or reopen/close one of its tasks (taskId+taskState). Server/DC uses optimistic locking (re-fetch + one retry on 409); Cloud applies single PUTs and has no severity field (the '[BLOCKER]' text tag is the convention).

bb_submit_pull_request_reviewA

Submit a review verdict (APPROVED | NEEDS_WORK | UNAPPROVED). Server/DC: best-effort publishing of pending drafts first, reviewer identity resolved automatically (userSlug → session user → activity consensus → single participant → userFilter). Cloud: reviews always act as the authenticated user (a mismatching userSlug is rejected), NEEDS_WORK maps to 'request changes', no pending drafts exist.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.6/5.0

Scored across 29 tools

Disambiguation4/5

Most tools target a distinct resource/action pair, and descriptions clearly differentiate overlapping list scopes such as dashboard vs inbox vs repository PRs. Some confusion remains between browse_repository and get_file_content, and between get_projects/get_project versus list-based naming, but overall selection is reliable.

Naming Consistency4/5

All tools use a consistent bb_ prefix and snake_case convention. The main inconsistency is semantic: 'get' is used both for listing collections (bb_get_projects, bb_get_repositories) and fetching single items, while other collections use 'list'.

Tool Count4/5

The 29 tools cover a broad Bitbucket surface including projects, repositories, files, branches, commits, pull requests, comments, reviews, and user dashboards. The count is heavy but largely justified by the domain breadth, with each tool covering a meaningful operation.

Completeness4/5

Pull request lifecycle coverage is strong, including creation, review, merge veto, merge, decline, reopen, comments, and reviews. Minor gaps exist around repository/project create-update-delete operations, single-commit lookup, and file write/commit operations.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues