bitbucket-mcp

v0.5.0
bitbucket-mcp Checked 1 day ago Published 9 months ago

MCP server for comprehensive Bitbucket Cloud API integration

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

setup_bitbucket Setup Bitbucket

Configure Bitbucket credentials for the MCP server.

ParameterTypeDescription
api_token *stringAtlassian API Token from https://id.atlassian.com/manage-profile/security/api-tokens
username *stringYour Atlassian account email (e.g., "user@example.com")
workspace *stringBitbucket workspace slug (e.g., "myworkspace")

get_config_status Get Config Status

Check if Bitbucket is configured and return current status.

create_pull_request Create Pull Request

Create a Pull Request on Bitbucket Cloud.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
source_branch *stringBranch to merge from
title *stringPR title
descriptionstringPR description (optional)
destination_branchstringBranch to merge into (default: main)
reviewersList of reviewer UUIDs or account_ids (optional). These are added in addition to default reviewers.
use_default_reviewersbooleanWhether to include default reviewers (default: True)
workspaceBitbucket workspace (optional if configured)

list_pull_requests List Pull Requests

List Pull Requests for a repository on Bitbucket Cloud.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 50 (default: 25)
statestringPR state filter - OPEN, MERGED, DECLINED, SUPERSEDED, or ALL (default: OPEN)
workspaceBitbucket workspace (optional if configured)

get_pull_request Get Pull Request

Get details of a specific Pull Request on Bitbucket Cloud.

ParameterTypeDescription
pr_id *integerPull Request ID
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

update_pull_request Update Pull Request

Update/edit an existing Pull Request on Bitbucket Cloud.

ParameterTypeDescription
pr_id *integerPull Request ID to update
repo_slug *stringRepository slug (name)
close_source_branchWhether to close source branch on merge (optional)
descriptionNew PR description (optional)
destination_branchNew destination branch (optional)
reviewersList of reviewer UUIDs or account_ids to set as reviewers (optional). Pass empty list [] to remove all reviewers.
titleNew PR title (optional)
workspaceBitbucket workspace (optional if configured)

approve_pull_request Approve Pull Request

Approve a Pull Request on Bitbucket Cloud.

ParameterTypeDescription
pr_id *integerPull Request ID to approve
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

unapprove_pull_request Unapprove Pull Request

Remove approval from a Pull Request on Bitbucket Cloud.

ParameterTypeDescription
pr_id *integerPull Request ID to unapprove
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

request_changes_pull_request Request Changes Pull Request

Request changes on a Pull Request on Bitbucket Cloud.

ParameterTypeDescription
pr_id *integerPull Request ID
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

add_pull_request_comment Add Pull Request Comment

Add a comment to a Pull Request on Bitbucket Cloud.

ParameterTypeDescription
comment *stringComment text (supports markdown)
pr_id *integerPull Request ID
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

get_pull_request_comments Get Pull Request Comments

Get comments from a Pull Request on Bitbucket Cloud.

ParameterTypeDescription
pr_id *integerPull Request ID
repo_slug *stringRepository slug (name)
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 50)
workspaceBitbucket workspace (optional if configured)

get_pull_request_diffstat Get Pull Request Diffstat

Get a summary of files changed in a Pull Request with line counts.

ParameterTypeDescription
pr_id *integerPull Request ID
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

get_pull_request_diff Get Pull Request Diff

Get the diff (code changes) for a Pull Request.

ParameterTypeDescription
pr_id *integerPull Request ID
repo_slug *stringRepository slug (name)
context_linesintegerNumber of context lines around changes (default: 3)
file_pathOptional specific file path to get diff for (recommended for large PRs)
workspaceBitbucket workspace (optional if configured)

merge_pull_request Merge Pull Request

Merge a Pull Request on Bitbucket Cloud.

ParameterTypeDescription
pr_id *integerPull Request ID to merge
repo_slug *stringRepository slug (name)
close_source_branchbooleanWhether to close the source branch after merge (default: False)
merge_strategystringMerge strategy - "merge_commit", "squash", or "fast_forward" (default: merge_commit)
messageCustom merge commit message (optional)
workspaceBitbucket workspace (optional if configured)

decline_pull_request Decline Pull Request

Decline/close a Pull Request on Bitbucket Cloud without merging.

ParameterTypeDescription
pr_id *integerPull Request ID to decline
repo_slug *stringRepository slug (name)
reasonOptional reason for declining (will be added as a comment)
workspaceBitbucket workspace (optional if configured)

reply_to_comment Reply To Comment

Reply to a specific comment on a Pull Request.

ParameterTypeDescription
comment_id *integerID of the comment to reply to
content *stringReply text (supports markdown)
pr_id *integerPull Request ID
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

add_inline_comment Add Inline Comment

Add an inline comment on a specific line of code in a Pull Request.

ParameterTypeDescription
content *stringComment text (supports markdown)
file_path *stringPath to the file to comment on
line *integerLine number to comment on
pr_id *integerPull Request ID
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

delete_comment Delete Comment

Delete a comment from a Pull Request.

ParameterTypeDescription
comment_id *integerID of the comment to delete
pr_id *integerPull Request ID
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

get_pull_request_activity Get Pull Request Activity

Get the activity/timeline of a Pull Request including comments, approvals, and updates.

ParameterTypeDescription
pr_id *integerPull Request ID
repo_slug *stringRepository slug (name)
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 50)
workspaceBitbucket workspace (optional if configured)

get_pull_request_commits Get Pull Request Commits

Get the list of commits in a Pull Request.

ParameterTypeDescription
pr_id *integerPull Request ID
repo_slug *stringRepository slug (name)
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 50)
workspaceBitbucket workspace (optional if configured)

add_reviewer Add Reviewer

Add a reviewer to a Pull Request without removing existing reviewers.

ParameterTypeDescription
pr_id *integerPull Request ID
repo_slug *stringRepository slug (name)
reviewer *stringUUID or account_id of the reviewer to add
workspaceBitbucket workspace (optional if configured)

remove_reviewer Remove Reviewer

Remove a reviewer from a Pull Request.

ParameterTypeDescription
pr_id *integerPull Request ID
repo_slug *stringRepository slug (name)
reviewer *stringUUID or account_id of the reviewer to remove
workspaceBitbucket workspace (optional if configured)

get_pull_request_merge_status Get Pull Request Merge Status

Check if a Pull Request can be merged and get merge status details.

ParameterTypeDescription
pr_id *integerPull Request ID
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

list_repositories List Repositories

List repositories in a Bitbucket workspace.

ParameterTypeDescription
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
queryOptional search query to filter repositories by name
workspaceBitbucket workspace (optional if configured)

get_repository Get Repository

Get detailed information about a specific repository.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

create_repository Create Repository

Create a new repository in a Bitbucket workspace.

ParameterTypeDescription
repo_slug *stringRepository slug (URL-friendly name)
descriptionRepository description (optional)
fork_policystringFork policy - "allow_forks", "no_public_forks", or "no_forks" (default: no_public_forks)
is_privatebooleanWhether the repository is private (default: True)
languageProgramming language (optional)
project_keyProject key to create the repo under (optional)
workspaceBitbucket workspace (optional if configured)

update_repository Update Repository

Update repository settings.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
descriptionNew description (optional)
fork_policyFork policy - "allow_forks", "no_public_forks", or "no_forks" (optional)
has_issuesEnable/disable issue tracker (optional)
has_wikiEnable/disable wiki (optional)
is_privateWhether the repository is private (optional)
languageProgramming language (optional)
workspaceBitbucket workspace (optional if configured)

delete_repository Delete Repository

Delete a repository. This action is irreversible.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

fork_repository Fork Repository

Fork a repository.

ParameterTypeDescription
repo_slug *stringRepository slug (name) to fork
new_nameName for the forked repository (optional, defaults to original name)
workspaceBitbucket workspace (optional if configured)

list_repository_forks List Repository Forks

List forks of a repository.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
workspaceBitbucket workspace (optional if configured)

list_branches List Branches

List branches in a repository.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
queryOptional search query to filter branches by name
workspaceBitbucket workspace (optional if configured)

create_branch Create Branch

Create a new branch in a repository.

ParameterTypeDescription
name *stringName for the new branch
repo_slug *stringRepository slug (name)
target *stringCommit hash, branch name, or tag to branch from
workspaceBitbucket workspace (optional if configured)

delete_branch Delete Branch

Delete a branch from a repository.

ParameterTypeDescription
name *stringBranch name to delete
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

list_tags List Tags

List tags in a repository.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
queryOptional search query to filter tags by name
workspaceBitbucket workspace (optional if configured)

create_tag Create Tag

Create a new tag in a repository.

ParameterTypeDescription
name *stringName for the new tag
repo_slug *stringRepository slug (name)
target *stringCommit hash to tag
workspaceBitbucket workspace (optional if configured)

delete_tag Delete Tag

Delete a tag from a repository.

ParameterTypeDescription
name *stringTag name to delete
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

get_branching_model Get Branching Model

Get the branching model configuration for a repository.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

get_file_contents Get File Contents

Get the contents of a file from a repository at a specific branch/commit.

ParameterTypeDescription
file_path *stringPath to the file in the repository
repo_slug *stringRepository slug (name)
refstringBranch name, tag, or commit hash (default: main)
workspaceBitbucket workspace (optional if configured)

list_commits List Commits

List commits in a repository.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
branchBranch name to list commits from (optional)
excludeCommit hash to exclude (optional)
includeCommit hash to include (optional)
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
workspaceBitbucket workspace (optional if configured)

get_commit Get Commit

Get details of a specific commit.

ParameterTypeDescription
commit_hash *stringThe commit hash
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

get_commit_diff Get Commit Diff

Get the diff for a commit or commit range.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
spec *stringCommit hash or range (e.g., "abc123" or "abc123..def456")
workspaceBitbucket workspace (optional if configured)

get_commit_diffstat Get Commit Diffstat

Get the diffstat (summary of changes) for a commit or commit range.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
spec *stringCommit hash or range (e.g., "abc123" or "abc123..def456")
workspaceBitbucket workspace (optional if configured)

list_commit_statuses List Commit Statuses

List build statuses for a specific commit.

ParameterTypeDescription
commit_hash *stringThe commit hash
repo_slug *stringRepository slug (name)
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
workspaceBitbucket workspace (optional if configured)

create_build_status Create Build Status

Create a build status for a commit.

ParameterTypeDescription
commit_hash *stringThe commit hash
key *stringUnique key for this build status
repo_slug *stringRepository slug (name)
state *stringBuild state - "SUCCESSFUL", "FAILED", "INPROGRESS", or "STOPPED"
descriptionDescription of the build status (optional)
nameDisplay name for the build (optional)
urlURL to the build results (optional)
workspaceBitbucket workspace (optional if configured)

list_commit_comments List Commit Comments

List comments on a specific commit.

ParameterTypeDescription
commit_hash *stringThe commit hash
repo_slug *stringRepository slug (name)
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
workspaceBitbucket workspace (optional if configured)

list_pipelines List Pipelines

List pipelines for a repository.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
sortSort field (e.g., "-created_on" for newest first) (optional)
workspaceBitbucket workspace (optional if configured)

get_pipeline Get Pipeline

Get details of a specific pipeline.

ParameterTypeDescription
pipeline_uuid *stringPipeline UUID (with or without braces)
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

trigger_pipeline Trigger Pipeline

Trigger a new pipeline run.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
branchBranch to run pipeline on (optional, defaults to main branch)
custom_pipelineName of custom pipeline to run (optional)
variablesList of pipeline variables as [{"key": "name", "value": "val", "secured": false}] (optional)
workspaceBitbucket workspace (optional if configured)

stop_pipeline Stop Pipeline

Stop a running pipeline.

ParameterTypeDescription
pipeline_uuid *stringPipeline UUID (with or without braces)
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

list_pipeline_steps List Pipeline Steps

List steps in a pipeline.

ParameterTypeDescription
pipeline_uuid *stringPipeline UUID (with or without braces)
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

get_pipeline_step_log Get Pipeline Step Log

Get the log output for a pipeline step.

ParameterTypeDescription
pipeline_uuid *stringPipeline UUID (with or without braces)
repo_slug *stringRepository slug (name)
step_uuid *stringStep UUID (with or without braces)
workspaceBitbucket workspace (optional if configured)

list_pipeline_variables List Pipeline Variables

List pipeline variables configured for a repository.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
workspaceBitbucket workspace (optional if configured)

create_pipeline_variable Create Pipeline Variable

Create a pipeline variable for a repository.

ParameterTypeDescription
key *stringVariable name
repo_slug *stringRepository slug (name)
value *stringVariable value
securedbooleanWhether the variable is secured/encrypted (default: False)
workspaceBitbucket workspace (optional if configured)

list_workspace_members List Workspace Members

List members of a Bitbucket workspace. Use this to find users who can be added as reviewers.

ParameterTypeDescription
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 50)
workspaceBitbucket workspace (optional if configured)

get_default_reviewers Get Default Reviewers

Get the default reviewers configured for a repository.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

list_workspaces List Workspaces

List all workspaces the authenticated user has access to.

get_workspace_details Get Workspace Details

Get detailed information about a workspace.

ParameterTypeDescription
workspaceBitbucket workspace slug (optional if configured)

list_workspace_permissions List Workspace Permissions

List permissions for a workspace.

ParameterTypeDescription
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 50)
workspaceBitbucket workspace (optional if configured)

list_projects List Projects

List projects in a workspace.

ParameterTypeDescription
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
workspaceBitbucket workspace (optional if configured)

get_project Get Project

Get details of a specific project.

ParameterTypeDescription
project_key *stringProject key
workspaceBitbucket workspace (optional if configured)

create_project Create Project

Create a new project in a workspace.

ParameterTypeDescription
key *stringProject key (unique identifier, uppercase letters and numbers)
name *stringProject name
descriptionProject description (optional)
is_privatebooleanWhether the project is private (default: True)
workspaceBitbucket workspace (optional if configured)

search_code Search Code

Search for code across repositories in a workspace.

ParameterTypeDescription
query *stringSearch query string
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
workspaceBitbucket workspace (optional if configured)

get_current_user Get Current User

Get the currently authenticated user's profile information.

get_user_profile Get User Profile

Get a user's public profile information.

ParameterTypeDescription
username *stringBitbucket username or UUID

get_user_permissions Get User Permissions

Get the current user's repository permissions.

ParameterTypeDescription
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
workspaceFilter by workspace (optional)

list_issues List Issues

List issues in a repository's issue tracker.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
priorityFilter by priority - "trivial", "minor", "major", "critical", "blocker" (optional)
querySearch query to filter issues (optional)
stateFilter by state - "new", "open", "resolved", "on hold", "invalid", "duplicate", "wontfix", "closed" (optional)
workspaceBitbucket workspace (optional if configured)

create_issue Create Issue

Create a new issue in a repository's issue tracker.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
title *stringIssue title
assigneeAccount ID of the assignee (optional)
contentIssue description in markdown (optional)
kindstringIssue kind - "bug", "enhancement", "proposal", or "task" (default: bug)
prioritystringIssue priority - "trivial", "minor", "major", "critical", or "blocker" (default: major)
workspaceBitbucket workspace (optional if configured)

get_issue Get Issue

Get details of a specific issue.

ParameterTypeDescription
issue_id *integerIssue ID
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

update_issue Update Issue

Update an existing issue.

ParameterTypeDescription
issue_id *integerIssue ID
repo_slug *stringRepository slug (name)
assigneeAccount ID of new assignee, or empty string to unassign (optional)
contentNew issue description in markdown (optional)
kindNew kind - "bug", "enhancement", "proposal", "task" (optional)
priorityNew priority - "trivial", "minor", "major", "critical", "blocker" (optional)
stateNew state - "new", "open", "resolved", "on hold", "invalid", "duplicate", "wontfix", "closed" (optional)
titleNew issue title (optional)
workspaceBitbucket workspace (optional if configured)

list_issue_comments List Issue Comments

List comments on an issue.

ParameterTypeDescription
issue_id *integerIssue ID
repo_slug *stringRepository slug (name)
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
workspaceBitbucket workspace (optional if configured)

add_issue_comment Add Issue Comment

Add a comment to an issue.

ParameterTypeDescription
content *stringComment text (supports markdown)
issue_id *integerIssue ID
repo_slug *stringRepository slug (name)
workspaceBitbucket workspace (optional if configured)

list_webhooks List Webhooks

List webhooks configured for a repository.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
workspaceBitbucket workspace (optional if configured)

create_webhook Create Webhook

Create a webhook for a repository.

ParameterTypeDescription
events *arrayList of events to subscribe to (e.g., ["repo:push", "pullrequest:created"])
repo_slug *stringRepository slug (name)
url *stringThe URL to receive webhook events
activebooleanWhether the webhook is active (default: True)
descriptionWebhook description (optional)
workspaceBitbucket workspace (optional if configured)

delete_webhook Delete Webhook

Delete a webhook from a repository.

ParameterTypeDescription
repo_slug *stringRepository slug (name)
webhook_uid *stringWebhook UUID (with or without braces)
workspaceBitbucket workspace (optional if configured)

list_workspace_webhooks List Workspace Webhooks

List webhooks configured for a workspace.

ParameterTypeDescription
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
workspaceBitbucket workspace (optional if configured)

list_snippets List Snippets

List snippets in a workspace.

ParameterTypeDescription
pageintegerPage number for pagination (default: 1)
pagelenintegerNumber of results per page, max 100 (default: 25)
workspaceBitbucket workspace (optional if configured)

create_snippet Create Snippet

Create a new snippet.

ParameterTypeDescription
content *stringSnippet file content
filename *stringFilename for the snippet content
title *stringSnippet title
is_privatebooleanWhether the snippet is private (default: False)
workspaceBitbucket workspace (optional if configured)

get_snippet Get Snippet

Get details of a specific snippet.

ParameterTypeDescription
snippet_id *stringSnippet ID
workspaceBitbucket workspace (optional if configured)

delete_snippet Delete Snippet

Delete a snippet.

ParameterTypeDescription
snippet_id *stringSnippet ID
workspaceBitbucket workspace (optional if configured)