lawp09 avatar

Bitbucket MCP Server

lawp09/bitbucket-mcp

Connects Claude, Copilot, and Cursor to Bitbucket Cloud through 45 tools covering repos, pull requests, comments, pipelines, and build statuses. You can review PRs, post inline comments, approve or request changes, run pipelines, and query CI status all through natural language. The server strips API noise for lower token usage and lets you filter diffs by file path to cut tokens by 95% on large PRs. Ships with safety guards on destructive operations like merging and pipeline stops. Runs via uvx with zero install, supports scoped API tokens, and includes batch review and draft PR workflows. Built for teams doing code review and CI monitoring from their AI assistant.

GitHub stars
3
tools
17
transport
STDIO
last updated
Oct 26, 2026

Tools

17 tools

Public tool metadata for what this MCP can expose to an agent.

BITBUCKET_CREATE_BRANCHCreates a new branch in a Bitbucket repository from a target commit hash; the branch name must be unique, adhere to Bitbucket's naming conventions, and not include the 'refs/heads/' prefix.4 params

Creates a new branch in a Bitbucket repository from a target commit hash; the branch name must be unique, adhere to Bitbucket's naming conventions, and not include the 'refs/heads/' prefix.

Parameters* required
namestring
The name for the new branch (e.g., 'feature/new-login', 'bugfix/issue-123'). Important: Do not include the 'refs/heads/' prefix.
repo_slugstring
The slug or UUID of the repository where the branch will be created. This is usually the repository's name in URL-friendly format.
target_hashstring
The full commit hash (SHA1) from which the new branch will be created. This commit must exist in the repository.
workspacestring
The workspace ID or UUID that owns the repository. This can typically be found in the URL of your Bitbucket workspace.
BITBUCKET_CREATE_ISSUECreates a new issue in a Bitbucket repository, setting the authenticated user as reporter; ensures assignee (if provided) has repository access, and that any specified milestone, version, or component IDs exist.11 params

Creates a new issue in a Bitbucket repository, setting the authenticated user as reporter; ensures assignee (if provided) has repository access, and that any specified milestone, version, or component IDs exist.

Parameters* required
assigneestring
Bitbucket username of the assignee. The assignee must have repository access.
component_idinteger
Numeric ID of an existing component to associate with this issue.
contentstring
Detailed description for the new issue.
due_onstring
Due date for the issue in ISO 8601 format (e.g., 'YYYY-MM-DDTHH:mm:ssZ').
kindstring
Type of the issue (e.g., 'bug', 'enhancement', 'proposal', 'task').
milestone_idinteger
Numeric ID of an existing milestone to associate with this issue.
prioritystring
Priority level of the issue (e.g., 'trivial', 'minor', 'major', 'critical', 'blocker').
repo_slugstring
The slug of the Bitbucket repository.
titlestring
Title for the new issue.
version_idinteger
Numeric ID of an existing version to associate with this issue.
workspacestring
The ID or slug of the Bitbucket workspace.
BITBUCKET_CREATE_ISSUE_COMMENTAdds a new comment with markdown support to an existing Bitbucket issue.4 params

Adds a new comment with markdown support to an existing Bitbucket issue.

Parameters* required
contentstring
The raw text content for the comment. This content supports markdown formatting, which Bitbucket will then render.
issue_idstring
The unique identifier of the issue on which the comment will be posted.
repo_slugstring
The slug (URL-friendly version) of the repository name.
workspacestring
The ID or slug of the workspace or user that owns the repository.
BITBUCKET_CREATE_PULL_REQUESTCreates a new pull request in a specified Bitbucket repository, ensuring the source branch exists and is distinct from the (optional) destination branch.8 params

Creates a new pull request in a specified Bitbucket repository, ensuring the source branch exists and is distinct from the (optional) destination branch.

Parameters* required
close_source_branchboolean
If true, automatically closes the source branch upon pull request merge.default: false
descriptionstring
Detailed Markdown description of the pull request, outlining changes and purpose.
destination_branchstring
Name of the destination branch for merging; defaults to repository's main branch if unspecified.
repo_slugstring
Slug (URL-friendly name) of the repository for the pull request.
reviewersarray
List of Bitbucket user UUIDs to be added as reviewers.
source_branchstring
Name of the source branch with changes to be merged.
titlestring
Concise title summarizing the changes for the pull request.
workspacestring
Workspace ID (UUID or slug) of the repository owner.
BITBUCKET_CREATE_REPOSITORYCreates a new Bitbucket 'git' repository in a specified workspace, defaulting to the workspace's oldest project if `project_key` is not provided.9 params

Creates a new Bitbucket 'git' repository in a specified workspace, defaulting to the workspace's oldest project if `project_key` is not provided.

Parameters* required
descriptionstring
Description for the new repository.
fork_policystring
Forking policy for the repository, determining who can create forks.one of allow_forks · no_public_forks · no_forksdefault: allow_forks
has_issuesboolean
Enable the issue tracker (`True`), or disable it (`False`).default: true
has_wikiboolean
Enable the wiki (`True`), or disable it (`False`).default: true
is_privateboolean
Repository visibility: `True` for private, `False` for public.default: true
languagestring
Primary programming language (e.g., 'python', 'java') for categorization.
project_keystring
Key of the Bitbucket project for the repository; if omitted, it's placed in the workspace's oldest project.
repo_slugstring
URL-friendly slug for the new repository.
workspacestring
ID or slug of the Bitbucket workspace for the new repository.
BITBUCKET_CREATE_SNIPPET_COMMENTPosts a new top-level comment or a threaded reply to an existing comment on a specified Bitbucket snippet.4 params

Posts a new top-level comment or a threaded reply to an existing comment on a specified Bitbucket snippet.

Parameters* required
contentstring
Raw text content of the comment; Bitbucket will render any included markup (like Markdown).
encoded_idstring
Unique, encoded ID of the Bitbucket snippet to comment on (typically part of the snippet's URL).
parent_idinteger
ID of an existing comment to reply to, creating a threaded comment; if omitted, a top-level comment is created.
workspacestring
Workspace ID or slug (e.g., 'my_workspace_slug' or a UUID) for the Bitbucket workspace containing the snippet.
BITBUCKET_DELETE_ISSUEPermanently deletes a specific issue, identified by its `issue_id`, from the repository specified by `repo_slug` within the given `workspace`.3 params

Permanently deletes a specific issue, identified by its `issue_id`, from the repository specified by `repo_slug` within the given `workspace`.

Parameters* required
issue_idstring
The unique identifier of the issue to be deleted from the specified repository.
repo_slugstring
The slug of the repository. This is the repository's name, usually in lowercase and with hyphens instead of spaces.
workspacestring
The workspace ID (slug) or UUID of the Bitbucket workspace that owns the repository. This can be the workspace name or its universally unique identifier.
BITBUCKET_DELETE_REPOSITORYPermanently deletes a specified Bitbucket repository; this action is irreversible and does not affect forks.2 params

Permanently deletes a specified Bitbucket repository; this action is irreversible and does not affect forks.

Parameters* required
repo_slugstring
The slug (URL-friendly name) of the repository to be deleted. This identifies the repository within the workspace.
workspacestring
The ID or slug of the Bitbucket workspace that owns the repository. This can be a user's username or a team's slug.
BITBUCKET_GET_CURRENT_USERRetrieves the profile information (UUID, display name, links, creation date) for the currently authenticated Bitbucket user.

Retrieves the profile information (UUID, display name, links, creation date) for the currently authenticated Bitbucket user.

No parameter schema in public metadata yet.

BITBUCKET_GET_FILE_FROM_REPOSITORYRetrieves a specific file's content from a Bitbucket repository at a given commit (hash, branch, or tag), failing if the file path is invalid for that commit.4 params

Retrieves a specific file's content from a Bitbucket repository at a given commit (hash, branch, or tag), failing if the file path is invalid for that commit.

Parameters* required
commitstring
Commit hash, branch name (fetches latest), or tag for the file version.
pathstring
Full path to the file within the repository (e.g., 'src/main.py').
repo_slugstring
Repository slug or UUID (typically URL-formatted name).
workspacestring
Workspace ID or UUID (often username or team name) containing the repository.
BITBUCKET_GET_PULL_REQUESTGet a single pull request by ID with complete details.3 params

Get a single pull request by ID with complete details.

Parameters* required
pull_request_idinteger
The ID of the pull request to retrieve.
repo_slugstring
Repository slug (URL-friendly name).
workspacestring
Workspace ID or slug (URL-friendly name).
BITBUCKET_GET_SNIPPETRetrieves a specific Bitbucket snippet by its encoded ID from an existing workspace, returning its metadata and file structure.3 params

Retrieves a specific Bitbucket snippet by its encoded ID from an existing workspace, returning its metadata and file structure.

Parameters* required
accept_formatstring
The desired format for the response. Valid options are 'application/json', 'multipart/related', or 'multipart/form-data'. This may affect how snippet content or file data is presented.default: application/json
encoded_idstring
The unique identifier (encoded ID) of the snippet to be retrieved.
workspacestring
The workspace ID (slug) or the workspace UUID surrounded by curly braces, identifying the Bitbucket workspace.
BITBUCKET_LIST_PULL_REQUESTSLists pull requests in a specified, accessible Bitbucket repository, optionally filtering by state (OPEN, MERGED, DECLINED).5 params

Lists pull requests in a specified, accessible Bitbucket repository, optionally filtering by state (OPEN, MERGED, DECLINED).

Parameters* required
pageinteger
Page number for paginated results (starts from 1).
pageleninteger
Number of pull requests per page (1-100). Bitbucket default if not specified.
repo_slugstring
Repository slug (URL-friendly name).
statestring
Lifecycle state of a pull request.one of OPEN · MERGED · DECLINED
workspacestring
Workspace ID or slug (URL-friendly name).
BITBUCKET_LIST_REPOSITORIES_IN_WORKSPACELists repositories in a specified Bitbucket workspace, accessible to the authenticated user, with options to filter by role or query string, and sort results.4 params

Lists repositories in a specified Bitbucket workspace, accessible to the authenticated user, with options to filter by role or query string, and sort results.

Parameters* required
qstring
Query string using Bitbucket's REST API filtering syntax to filter repositories. For detailed syntax, refer to Bitbucket API documentation.
rolestring
Filters repositories by the authenticated user's role within each repository.
sortstring
Field for sorting repository results. Prefix with '-' for descending order. Common sortable fields: 'name', 'updated_on', 'created_on'.
workspacestring
The identifier of the Bitbucket workspace. This can be the workspace slug (e.g., 'my-workspace') or its UUID enclosed in curly braces (e.g., '{workspace-uuid}').
BITBUCKET_LIST_WORKSPACE_MEMBERSLists all members of a specified Bitbucket workspace; the workspace must exist.1 params

Lists all members of a specified Bitbucket workspace; the workspace must exist.

Parameters* required
workspacestring
The workspace ID (UUID) or slug from which to list members. The slug is the user-friendly, URL-safe identifier for the workspace.
BITBUCKET_LIST_WORKSPACESLists Bitbucket workspaces accessible to the authenticated user, optionally filtered and sorted.2 params

Lists Bitbucket workspaces accessible to the authenticated user, optionally filtered and sorted.

Parameters* required
qstring
Query string to filter workspaces by attributes, following Bitbucket's filtering syntax.
sortstring
Field to sort returned workspaces by; prefix with a hyphen (-) for descending order.
BITBUCKET_UPDATE_ISSUEUpdates an existing issue in a Bitbucket repository by modifying specified attributes; requires `workspace`, `repo_slug`, `issue_id`, and at least one attribute to update.12 params

Updates an existing issue in a Bitbucket repository by modifying specified attributes; requires `workspace`, `repo_slug`, `issue_id`, and at least one attribute to update.

Parameters* required
assignee_account_idstring
The Bitbucket account ID (UUID) of the user to assign the issue to. If omitted, the assignee remains unchanged.
componentstring
The name of the component to associate with the issue (e.g., 'API', 'Frontend'). If omitted, the component remains unchanged.
contentstring
The new content or description for the issue, in raw text format. If omitted, the content remains unchanged.
issue_idstring
The unique identifier (ID) of the issue to be updated.
kindstring
The updated kind (type) for the issue. If omitted, kind remains unchanged.
milestonestring
The name of the milestone to associate with the issue (e.g., 'Sprint 1', 'v1.0 Launch'). If omitted, the milestone remains unchanged.
prioritystring
The updated priority for the issue. If omitted, priority remains unchanged.
repo_slugstring
The slug or name of the repository (e.g., 'my-app-repo').
statestring
The updated state for the issue. If omitted, state remains unchanged.
titlestring
The new title for the issue. If omitted, the title remains unchanged.
versionstring
The name of the version affected by this issue (e.g., '1.0.0', '2.0-beta'). If omitted, the version remains unchanged.
workspacestring
The workspace ID or slug that owns the repository (e.g., 'my-company' or '{123e4567-e89b-12d3-a456-426614174000}').

Sponsors

Readme

Bitbucket MCP Server (Python)

PyPI Python CI CodeQL License: MIT

Connect Claude Code, OpenAI Codex, Cursor, VS Code (GitHub Copilot), and any MCP-compatible AI assistant to your Bitbucket Cloud repositories. Review pull requests, monitor pipelines, and manage your code — all through natural language.

Features


View the full README on GitHub

Details

Repository
github.com/lawp09/bitbucket-mcp
Category
Developer Tools
Package
bitbucket-mcp-py
Transport
STDIO
Registry
MCP registry, active

Related Developer Tools MCP servers

View all
1theupsider avatarLsp Mcptheupsider/lsp-mcpUniversal LSP MCP server2stars
2abm-dev-git avatarAbm Mcpabm-dev-git/abm-mcpabm.dev — the account-based marketing API for AI agents: Search, Enrich, and Create across B2B.1stars
3domdomegg avatarFilesystemdomdomegg/filesystem-mcpRead, create, and edit files.1stars
4dingdawg avatarDingdawg Code Reviewdingdawg/dingdawg-agent-1AI code review — security, quality, performance. Learns your patterns. Receipted.0stars
5ofershap avatarGithub Gistofershap/mcp-server-github-gistMCP server to create, read, update, list, and search GitHub Gists from your IDE1stars
6pipeworx-io avatarGitlab Publicpipeworx-io/mcp-gitlab-publicGitLab Public MCP — wraps the GitLab REST API v4 (public endpoints, no auth)1stars