bitbucket-mcp

v3.7.4
@tugudush/bitbucket-mcp Checked 1 day ago Published 4 months ago

A Model Context Protocol server for Bitbucket with read-only operations

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

bb_get_repository

Get detailed information about a specific repository

ParameterTypeDescription
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)

bb_list_repositories

List repositories in a workspace

ParameterTypeDescription
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100)

bb_list_workspaces

List all accessible workspaces for discovery and exploration

ParameterTypeDescription
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100)

bb_get_pull_requests

Get pull requests for a repository

ParameterTypeDescription
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100)
statestringFilter by pull request state

bb_get_pull_request

Get detailed information about a specific pull request

ParameterTypeDescription
pull_request_id *numberThe pull request ID
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)

bb_get_pull_request_comments

Get comments for a specific pull request

ParameterTypeDescription
pull_request_id *numberThe pull request ID
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100)

bb_get_pull_request_comment

Get a single comment by ID from a pull request

ParameterTypeDescription
comment_id *numberThe comment ID
pull_request_id *numberThe pull request ID
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)

bb_get_comment_thread

Get a comment thread including the root comment and all nested replies

ParameterTypeDescription
comment_id *numberThe root comment ID to get thread for (will include all replies)
pull_request_id *numberThe pull request ID
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)

bb_get_pull_request_activity

Get activity (reviews, approvals, comments) for a specific pull request

ParameterTypeDescription
pull_request_id *numberThe pull request ID
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100)

bb_get_pull_request_diff

Get the raw unified diff for a pull request. Returns text/plain diff output showing all changes.

ParameterTypeDescription
pull_request_id *numberThe pull request ID
repo_slug *stringThe repository name
workspace *stringThe workspace or username
contextnumberNumber of context lines around changes (like git diff -U)
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pathstringFilter diff to a single file path

bb_get_pull_request_diffstat

Get the diffstat for a pull request — per-file summary of lines added/removed and change status.

ParameterTypeDescription
pull_request_id *numberThe pull request ID
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pathstringFilter diffstat to a single file path

bb_get_diff

Get the raw unified diff between commits. Use a single commit hash to diff against its parent, or "commit1..commit2" for comparing two commits.

ParameterTypeDescription
repo_slug *stringThe repository name
spec *stringCommit spec: a single commit hash (diffs against parent), or two commits as "commit1..commit2"
workspace *stringThe workspace or username
contextnumberNumber of context lines around changes
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
ignore_whitespacebooleanIgnore whitespace changes
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pathstringFilter diff to a single file path
topicbooleanWhen true with two-commit spec, produces a 3-dot diff (source vs merge-base)

bb_get_diffstat

Get diffstat (per-file change summary) between commits. Use a single commit hash or "commit1..commit2".

ParameterTypeDescription
repo_slug *stringThe repository name
spec *stringCommit spec: a single commit hash (diffs against parent), or two commits as "commit1..commit2"
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
ignore_whitespacebooleanIgnore whitespace changes
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pathstringFilter diffstat to a single file path
topicbooleanWhen true with two-commit spec, produces a 3-dot diff (source vs merge-base)

bb_get_pr_commits

List commits that belong to a pull request

ParameterTypeDescription
pull_request_id *numberThe pull request ID
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100)

bb_get_pr_statuses

Get CI/CD build statuses for a pull request (checks whether builds pass or fail)

ParameterTypeDescription
pull_request_id *numberThe pull request ID
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100)

bb_get_commit

Get detailed information about a specific commit (hash, message, author, parents)

ParameterTypeDescription
commit *stringThe commit hash, branch name, or tag
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)

bb_get_commit_statuses

Get CI/CD build statuses for a specific commit

ParameterTypeDescription
commit *stringThe commit hash
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100)

bb_get_merge_base

Get the common ancestor (merge-base) between two commits or branches. Use "branch1..branch2" format.

ParameterTypeDescription
repo_slug *stringThe repository name
revspec *stringTwo commit hashes or branch names separated by ".." (e.g. "main..feature-branch")
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)

bb_get_file_history

Get the commit history for a specific file — shows which commits modified the file and when.

ParameterTypeDescription
commit *stringCommit hash, branch, or tag to start history from
path *stringPath to the file in the repository
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100)

bb_get_tags

List tags (release tags, version tags) for a repository

ParameterTypeDescription
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100)

bb_get_tag

Get detailed information about a specific tag including its target commit

ParameterTypeDescription
name *stringThe tag name
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)

bb_get_branch

Get detailed information about a specific branch including target commit and merge strategies

ParameterTypeDescription
name *stringThe branch name
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)

bb_list_pipelines

List CI/CD pipeline runs for a repository. Shows build status, trigger, and duration.

ParameterTypeDescription
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100)

bb_get_pipeline

Get detailed information about a specific pipeline run

ParameterTypeDescription
pipeline_uuid *stringThe pipeline UUID (with or without curly braces)
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)

bb_get_pipeline_steps

List the steps/stages of a pipeline run with their status and duration

ParameterTypeDescription
pipeline_uuid *stringThe pipeline UUID (with or without curly braces)
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100)

bb_get_pipeline_step_log

Get the build log output for a specific pipeline step. Useful for diagnosing build failures.

ParameterTypeDescription
pipeline_uuid *stringThe pipeline UUID (with or without curly braces)
repo_slug *stringThe repository name
step_uuid *stringThe step UUID (with or without curly braces)
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)

bb_get_issues

Get issues for a repository

ParameterTypeDescription
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
kindstringFilter by issue kind
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100)
statestringFilter by issue state

bb_get_issue

Get detailed information about a specific issue

ParameterTypeDescription
issue_id *numberThe issue ID
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)

bb_get_commits

Get commits for a repository branch

ParameterTypeDescription
repo_slug *stringThe repository name
workspace *stringThe workspace or username
branchstringBranch name (defaults to main branch)
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100)

bb_get_branches

Get branches for a repository

ParameterTypeDescription
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100)

bb_get_file_content

Get the content of a file from a repository with pagination support

ParameterTypeDescription
file_path *stringPath to the file in the repository
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
limitnumberMaximum number of lines to return (default: 1000, max: 10000)
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
refstringBranch, tag, or commit hash (defaults to main branch)
startnumberStarting line number for pagination (1-based, default: 1)

bb_browse_repository

Browse files and directories in a repository to explore structure

ParameterTypeDescription
repo_slug *stringThe repository name
workspace *stringThe workspace or username
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
limitnumberMaximum number of items to return (default: 50, max: 100)
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pathstringDirectory path within the repository (default: repo root)
refstringBranch, tag, or commit hash (defaults to main branch)

bb_get_user

Get public information about a Bitbucket user by username or UUID. If no user is specified, returns the authenticated user. Note: private profiles may have limited fields.

ParameterTypeDescription
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
selected_userstringThe username or UUID of the user to look up. If omitted, returns information about the authenticated user. Note: some fields may be omitted for private profiles.

bb_get_current_user

Get information about the currently authenticated user.

ParameterTypeDescription
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)

bb_search_repositories

Search for repositories within a workspace by name or description. Uses Bitbucket server-side filtering to search across all repositories, not just the first page. Supports sorting with the sort parameter.

ParameterTypeDescription
query *stringSearch query to filter repositories by name or description. Uses Bitbucket server-side filtering (BBQL) to search across all repositories in the workspace.
workspace *stringThe workspace or username to search in
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100). Defaults to 100 for search.
sortstringSort field, e.g. "-updated_on" for newest first, "name" for alphabetical. Prefix with "-" for descending order.

bb_search_code

Search for code content within a workspace. Supports filtering by repository, language, and file extension.

ParameterTypeDescription
search_query *stringSearch query for code content
workspace *stringThe workspace to search in
extensionstringFilter code search by file extension
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
languagestringFilter code search by programming language
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pagenumberPage number for pagination
pagelennumberNumber of items per page (max 100)
repo_slugstringRepository slug to limit search to specific repository

bb_get_workspace

Get information about a workspace

ParameterTypeDescription
workspace *stringThe workspace name
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)

bb_get_context

Get a curated bundle of PR context in a single call: PR metadata, diffstat summary, build/review status, and comment previews. Accepts a Bitbucket PR URL, or workspace/repo with pull_request_id or branch. Use detail_level "full" for PR description, per-file diffstat, and last 20 comments.

ParameterTypeDescription
branchstringBranch name to look up the open pull request for. Ignored if pull_request_id is provided.
detail_levelstringControls response verbosity: "summary" (default) returns counts and previews; "full" includes PR description, per-file diffstat, and last 20 comments.
filterstringJMESPath expression to filter/transform structured response data. Applied before format conversion. Example: "values[].{name: full_name, lang: language}" — see https://jmespath.org for syntax
output_formatstringResponse format: "text" (default, human-readable), "json" (structured JSON), or "toon" (Token-Oriented Object Notation — compact tabular format that reduces LLM token consumption by 30-60%)
pull_request_idnumberThe pull request ID. If omitted, branch must be provided to look up the open PR.
repo_slugstringThe repository name (required if url is not provided)
urlstringA Bitbucket pull request URL (e.g. https://bitbucket.org/workspace/repo/pull-requests/42). If provided, workspace, repo_slug, and pull_request_id are extracted automatically.
workspacestringThe workspace or username (required if url is not provided)