bitbucket-mcp
This server connects AI assistants to Bitbucket Cloud via 60+ MCP tools and prompts, enabling natural language management of repositories, pull requests, pipelines, and more.
Repository Management: List, get details, and tags.
Pull Request Operations: Create (regular/draft), update, approve/unapprove, request changes, decline, merge; batch review with multiple comments; publish drafts; get review summaries and AI-suggested reviewers.
Comments & Tasks: Add, update, delete, resolve, reopen PR and commit comments; manage PR tasks; view activity logs.
Diffs & Commit Review: Retrieve diffs, diffstats, commits; comment on commits; browse file contents and directory listings.
CI/CD & Pipelines: View build statuses (PRs and commits); list, inspect, run, stop pipeline runs; access steps and logs; manage variables, schedules, and caches.
Issue Tracking: List, create, update issues and comments.
Access & Permissions: Manage default reviewers, workspace/repo permissions, and members.
Deployments & Branch Protection: List environments and deployments; manage branch restrictions.
AI-Enhanced Workflows: MCP prompts for PR review (
review_pull_request), pipeline debugging (debug_pipeline_failure), repository summarization, and reviewer onboarding, all with parameterized templates.
Tools include read-only/destructive hints for safe interaction, and the server supports flexible configuration (enable/disable tools), secure credential handling, and multiple deployment options (local, Docker, stdio/HTTP).
Provides tools for managing Bitbucket Cloud repositories, pull requests, comments, tasks, diffs, pipelines, build statuses, reviewers, draft PRs, and batch review.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bitbucket-mcp Show my recent pull requests"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Bitbucket MCP Server (Python)
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
60+ MCP tools — repositories, pull requests, comments, tasks, diffs, pipelines (runtime + config), build statuses, reviewers, draft PRs, batch review, issue tracker, commits, source/file browsing
MCP 2025 tool annotations — every tool advertises
readOnlyHint/destructiveHint/idempotentHint/openWorldHint+ a human-readable title, so clients (Claude Code, Cursor) auto-include read-only tools and warn before destructive operationsSlim responses — stripped API noise for lower LLM token usage
Configurable — enable/disable tools via
configs/tools.jsonorBITBUCKET_TOOLS_CONFIGenv varSecure credentials — environment variables or system keychain
Related MCP server: Atlassian Bitbucket MCP Server
Quick Start
1. Install
The recommended way to run the server is via uvx (zero install, isolated environment):
# Always latest version
uvx --from bitbucket-mcp-py bitbucket-mcp
# Pin a specific version
uvx --from bitbucket-mcp-py==1.8.1 bitbucket-mcpWhy
--from? The PyPI package isbitbucket-mcp-pybut the command entry point isbitbucket-mcp. The--fromflag tells uvx which package to install.
Mode | Command | Best for |
pip global |
| Simple, persistent install |
Local dev |
| Contributing to the project |
Docker | See Docker section | Container-based workflows |
2. Configure credentials
Set the following environment variables — in your MCP client's env block, as shown above, or in the system keychain (see Credentials):
Variable | Description |
| Your Bitbucket email |
| Your Bitbucket API token |
| Your workspace slug |
Get your API token at: https://id.atlassian.com/manage-profile/security/api-tokens
⚠️ Use a scoped token, not a global one. When creating the token, select specific scopes (e.g.
Repositories: Read,Pull requests: Read/Write). Global tokens without explicit scopes do not work with this MCP server.
3. Configure your AI assistant
Claude Code (recommended)
Option A — CLI (fastest):
claude mcp add bitbucket-mcp \
-e BITBUCKET_USERNAME=your-email@example.com \
-e BITBUCKET_TOKEN=your-api-token \
-e BITBUCKET_WORKSPACE=your-workspace \
-- uvx --from bitbucket-mcp-py bitbucket-mcpOption B — JSON config (~/.claude.json or project .mcp.json):
{
"mcpServers": {
"bitbucket-mcp": {
"type": "stdio",
"command": "uvx",
"args": ["--from", "bitbucket-mcp-py", "bitbucket-mcp"],
"env": {
"BITBUCKET_USERNAME": "your-email@example.com",
"BITBUCKET_TOKEN": "your-api-token",
"BITBUCKET_WORKSPACE": "your-workspace"
}
}
}
}OpenAI Codex
Option A — CLI (fastest):
codex mcp add bitbucket-mcp \
--env BITBUCKET_USERNAME=your-email@example.com \
--env BITBUCKET_TOKEN=your-api-token \
--env BITBUCKET_WORKSPACE=your-workspace \
-- uvx --from bitbucket-mcp-py bitbucket-mcpOption B — TOML config (~/.codex/config.toml):
[mcp_servers.bitbucket-mcp]
command = "uvx"
args = ["--from", "bitbucket-mcp-py", "bitbucket-mcp"]
env = { BITBUCKET_USERNAME = "your-email@example.com", BITBUCKET_TOKEN = "your-api-token", BITBUCKET_WORKSPACE = "your-workspace" }Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"bitbucket-mcp": {
"command": "uvx",
"args": ["--from", "bitbucket-mcp-py", "bitbucket-mcp"],
"env": {
"BITBUCKET_USERNAME": "your-email@example.com",
"BITBUCKET_TOKEN": "your-api-token",
"BITBUCKET_WORKSPACE": "your-workspace"
}
}
}
}VS Code (GitHub Copilot)
Add to .vscode/mcp.json (workspace) or ~/Library/Application Support/Code/User/mcp.json (global, macOS):
{
"servers": {
"bitbucket-mcp": {
"type": "stdio",
"command": "uvx",
"args": ["--from", "bitbucket-mcp-py", "bitbucket-mcp"],
"env": {
"BITBUCKET_USERNAME": "your-email@example.com",
"BITBUCKET_TOKEN": "your-api-token",
"BITBUCKET_WORKSPACE": "your-workspace"
}
}
}
}Available Tools
Category | Tools |
Repositories |
|
Pull Requests |
|
Comments |
|
Tasks PR |
|
Diff / Review |
|
PR Discovery |
|
Build / CI |
|
Pipelines |
|
Pipelines Config |
|
Reviewers |
|
Draft PR |
|
Batch Review |
|
Review Summary |
|
Issues |
|
Commits |
|
Source |
|
Deployments |
|
Branch Restrictions |
|
Workspace |
|
Disabled by default:
merge_pull_request(safety),stop_pipeline(safety),get_pull_request_patch(git am format — not useful for AI review),convert_pull_request_to_draft(not supported by Bitbucket API),delete_issue(safety),delete_issue_comment(safety),add_commit_comment(write op),create_pipeline_variable/update_pipeline_variable/delete_pipeline_variable(write ops),create_pipeline_schedule/update_pipeline_schedule/delete_pipeline_schedule(write ops),delete_pipeline_cache(safety),create_environment/delete_environment/create_deployment_variable/update_deployment_variable/delete_deployment_variable(write ops),create_branch_restriction/update_branch_restriction/delete_branch_restriction(write ops). Enable inconfigs/tools.json.
Governance scopes — Branch restriction read tools need the
repositoryscope (repository:adminmay be required depending on repo config); the write tools needrepository:admin. Workspace member/permission tools need theaccountscope. The/membersendpoint lists users without a per-user permission (uselist_workspace_permissionsfor roles).
Deployments scopes — the read tools (
list_environments,get_environment,list_deployments,get_deployment,list_deployment_variables) need thedeploymentscope; the write tools needdeployment:write. Bitbucket has no server-side filter for deployments by environment (BCLOUD-18729) — filter on theenvironmentfield oflist_deploymentsinstead. There is noupdate_environmenttool: Bitbucket exposes noPUTfor environments (onlyPOST .../changesfor locking).
Custom tool configuration
By default the server reads configs/tools.json bundled with the package. You can point to a custom file at runtime without rebuilding:
export BITBUCKET_TOOLS_CONFIG=/path/to/my-tools.jsonFallback chain (first match wins):
BITBUCKET_TOOLS_CONFIGenvironment variableBuilt-in
configs/tools.json
Fail-safe behaviour — If
BITBUCKET_TOOLS_CONFIGis set but the file is missing or contains invalid JSON, the server raises an error on startup (explicit failure rather than silently ignoring the override). If the built-in default is missing, all tools are enabled.
Token tip —
get_pull_request_diffaccepts an optionalpathparameter to filter the diff to a single file, reducing token usage by ~95% on large PRs:get_pull_request_diff(repo_slug, pull_request_id, path="src/services/myService.ts")Token tip —
get_pipeline_step_logsreturns only the trailing 100 KiB of a step log by default (raw logs run to several MB on long steps). The response carries atruncatedflag; widen the window with the absolute byte rangestart/end, or passmax_bytes=nullfor the whole log. Pass a service container UUID aslog_uuidto read that service's log instead of the build container's. This endpoint needs a real pipeline UUID — resolve it viaget_pipeline_runif you only have a build number.get_pipeline_step_logs(repo_slug, pipeline_uuid="{adab6a1f-...}", step_uuid="{84fc6465-...}")
MCP Prompts
The server also exposes MCP Prompts — parameterised templates that compatible clients (Claude Code, Cursor, ...) surface as slash commands. Instead of remembering tool names, you invoke a prompt and the assistant orchestrates the right tools for you. They appear in the client's prompt picker (prompts/list).
Prompt | Arguments | What it does |
|
| Full AI review: metadata → diffstat → diff → comments → tasks, then Summary / Risk / Quality / Security / Recommendation |
|
| Diagnose a failed pipeline: run → steps → failed-step logs, then Root cause / Failed step / Error / Fix |
|
| Repo overview: info → recent commits → open PRs → CI → issues, then Purpose / Activity / Health / Contributors |
|
| Help a new reviewer: PR context → commits → diff → review history, then Context / Changes / Review-so-far / Focus |
Prompts are enabled/disabled in configs/tools.json under the top-level prompts key (separate from tools).
Credentials
Option 1: environment variables (recommended)
Put them in the env block of your MCP client configuration, as in the examples above, or export them in the shell that launches the server.
Option 2: System keychain (most secure)
pip install 'bitbucket-mcp-py[keyring]'
python3 -c "import keyring; keyring.set_password('bitbucket-mcp', 'bitbucket_token', 'YOUR_TOKEN')"About
.env: the server itself never reads a.envfile..env.exampleis a template for containers, which load it with--env-file .envorenv_file:(the Docker, Makefile anddocker-compose.ymlsetups); withuvxorpython -m src.main, use option 1 or 2.
Docker (Alternative)
If you prefer running the server in a container:
docker build -t bitbucket-mcp-py .
docker run -d --name bitbucket-mcp --env-file .env bitbucket-mcp-pyThen configure your AI assistant to use docker exec:
{
"mcpServers": {
"bitbucket-mcp": {
"command": "docker",
"args": ["exec", "-i", "bitbucket-mcp", "python", "-m", "src.main", "--transport", "stdio"]
}
}
}Transports
The server speaks stdio by default (the standard transport for local MCP clients). For a network deployment it also supports Streamable HTTP (MCP spec 2025-03-26):
# Streamable HTTP on localhost:8080
python -m src.main --transport http --host 127.0.0.1 --port 8080Clients connect to
http://<host>:<port>/mcp(e.g.http://localhost:8080/mcp).
⚠️
--hostdefaults to0.0.0.0, every interface. Without--multi-tenantthe server has no authentication of its own: anyone who can reach the port acts with your Bitbucket token. Bind to127.0.0.1unless the port sits behind an authenticating proxy.
--transport sse(legacy Server-Sent Events) is still accepted but deprecated — it emits aDeprecationWarning. Prefer--transport http.
Stateless HTTP (horizontal scaling / serverless)
--stateless runs the Streamable HTTP transport without server-side sessions: no Mcp-Session-Id, a fresh transport per HTTP request. Any instance behind a load balancer can serve any request — no sticky sessions required.
python -m src.main --transport http --host 0.0.0.0 --port 8080 --stateless⚠️ Single-tenant by default. Without
--multi-tenantthe server serves its own process-wide Bitbucket token to every caller. Deploy it on a private network or behind an authenticated reverse proxy — or use multi-tenant mode, where each caller brings their own credentials.
--stateless requires --transport http (it is rejected on stdio and on the legacy sse, whose app ignores the setting). It also forces a single JSON response instead of an SSE stream, because edge/serverless runtimes cannot hold a streaming response open — there is currently no way to combine stateless with streaming.
A liveness endpoint is exposed on both HTTP transports for load balancers:
curl http://localhost:8080/healthz # {"status": "ok"}In a container — the image's default CMD keeps it idle for exec-based stdio usage, so server mode is started by overriding the command:
podman run -d --name bitbucket-mcp-http -p 127.0.0.1:8000:8000 --env-file .env bitbucket-mcp-py \
python -m src.main --transport http --host 0.0.0.0 --port 8000 --statelessInside the container
--host 0.0.0.0is required;-p 127.0.0.1:8000:8000is what keeps the published port off the network, since this single-tenant server answers every caller with the.envtoken.
Works identically with
docker run. The image exposes port 8000.
Environment variable | Default | Purpose |
| (unset) | Comma-separated |
| (unset) | Comma-separated |
|
| Max pages a single tool call may fetch in stateless mode. Beyond it the response carries |
The two allowlists must be set together: an empty
Hostallowlist rejects every request (421), and an emptyOriginallowlist rejects every browser client (403). Setting only one is refused at startup rather than silently locking the server out.
export BITBUCKET_ALLOWED_HOSTS="mcp.example.com"
export BITBUCKET_ALLOWED_ORIGINS="https://app.example.com"With neither allowlist set, no DNS-rebinding protection is applied — appropriate for a server reached through a private network or a trusted proxy. Set them as soon as the server is exposed on a real hostname.
Multi-tenant HTTP (per-request credentials)
By default an HTTP deployment is single-tenant: every caller acts with the process-wide Bitbucket token. --multi-tenant changes that — each request carries the caller's own Bitbucket OAuth access token as Authorization: Bearer, and runs under that identity. The server holds no Bitbucket credential of its own.
BITBUCKET_RESOURCE_SERVER_URL=https://mcp.example.com/mcp \
python -m src.main --transport http --host 0.0.0.0 --port 8080 --stateless --multi-tenantThe token is verified against GET /2.0/user, which yields the caller's account_id and default workspace; the same token is then reused for the downstream API calls, so no credential is ever stored or mapped. Unauthenticated requests get a 401 with a WWW-Authenticate challenge pointing at /.well-known/oauth-protected-resource/mcp. Since Bitbucket publishes no OAuth metadata, the server serves /.well-known/oauth-authorization-server itself, pointing at Bitbucket's endpoints — which is what lets it be added to claude.ai as a custom connector (Bitbucket sign-in through the Atlassian login); setup, what was verified and the residual risks in docs/deployment-modes.md.
What this buys you:
Isolation — one Bitbucket client per
(identity, workspace); two callers never share one, and there is no process token to fall back on.workspace=Nonemeans your workspace — resolved from the caller's memberships, never fromBITBUCKET_WORKSPACE. With zero or several memberships there is no default and calls must name their workspace.Audit trail — every call is logged to the
bitbucket_mcp.auditlogger with the tool, theaccount_idand the workspace. Never credentials.Tighter defaults — tools flagged
destructiveHintare refused unless explicitly enabled. The other write tools (comment, approve, create a pull request, run a pipeline…) stay available to every caller: setBITBUCKET_MULTITENANT_READ_ONLY=1for a first deployment.
Environment variable | Default | Purpose |
| (required) | Public URL of the MCP endpoint, e.g. |
| (this server's origin) | Advertised authorization server. Leave unset: the server then publishes the OAuth metadata itself |
|
| Bound on the per-identity client cache (LRU + TTL, seconds). TTL |
|
| Bound on cached token verifications. The TTL is the revocation window — set it to |
| (off) | Allow the destructive tools that |
| (off) | Expose read-only tools only |
| (unset: any account) | Comma-separated workspace slugs — only their members are admitted, and no call can reach another workspace. Set it on any public endpoint |
Spec deviation: the caller's Bitbucket token is accepted without an audience check and forwarded upstream as-is, which the MCP authorization spec (2025-11-25) forbids — trade-offs and residual risks in docs/deployment-modes.md.
Not supported in this mode: Bitbucket Repository/Workspace Access Tokens — they are not bound to a user account, so no identity can be derived. Use single-tenant HTTP for that. Bearer tokens require TLS: terminate HTTPS in front of the server.
stdio is unaffected — it stays single-user with environment variables, exactly as documented above.
See docs/deployment-modes.md for the full matrix of the three deployment modes and the threat model of each.
Kubernetes (k3s, datacenter, GKE)
Each release publishes a multi-arch image (ghcr.io/lawp09/bitbucket-mcp) and a Helm chart (oci://ghcr.io/lawp09/charts/bitbucket-mcp) that deploy the multi-tenant HTTP mode; publicUrl is the only required value:
helm upgrade --install bitbucket-mcp oci://ghcr.io/lawp09/charts/bitbucket-mcp --version <version> \
-n bitbucket-mcp --create-namespace --set publicUrl=https://mcp.example.comIngress, GKE and network-policy notes: docs/deployment-kubernetes.md.
Development
# Install dev dependencies
uv sync --extra dev
# Run tests
uv run pytest tests/ -v
# Run specific test
uv run pytest tests/test_client.py -vRequirements
Python 3.12+
Bitbucket API token
License
MIT
References
MCP Registry — Official MCP server registry
PyPI Package — Python package
Available Tools
74 toolsadd_issue_commentAdd Issue CommentA
Add a comment to an issue.
Args: repo_slug: Repository slug issue_id: Issue ID content: Comment content in markdown workspace: Workspace name (optional, defaults to configured workspace)
Returns: Created issue comment details. If the repository has no issue tracker, returns {"error": "issue_tracker_disabled", ...}.
Inputs: content (required), issue_id (required), repo_slug (required), workspace. Returns: result
add_pull_request_commentAdd Pull Request CommentA
Add a comment to a pull request (general or inline).
Args: repo_slug: Repository slug pull_request_id: Pull request ID content: Comment content in markdown format workspace: Workspace name (optional, defaults to configured workspace) inline_path: Path to the file in the repository (for inline comments) inline_from: Line number in the old version of the file (for deleted or modified lines) inline_to: Line number in the new version of the file (for added or modified lines) pending: Whether to create this comment as a pending comment (draft state) (default: False) parent_id: ID of the comment to reply to (creates a threaded reply)
Returns: Created comment details
Inputs: content (required), repo_slug (required), pull_request_id (required), pending, +5 more. Returns: result
approve_pull_requestApprove Pull RequestAIdempotent
Approve a pull request.
Args: repo_slug: Repository slug pull_request_id: Pull request ID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Approval details
Inputs: repo_slug (required), pull_request_id (required), workspace. Returns: result
create_draft_pull_requestCreate Draft Pull RequestA
Create a new pull request as draft. Draft PRs are not ready for review.
Args: repo_slug: Repository slug title: Pull request title description: Pull request description source_branch: Source branch name target_branch: Target branch name workspace: Workspace name (optional, defaults to configured workspace) reviewers: List of reviewer UUIDs (optional)
Returns: Created draft pull request details
Inputs: title (required), repo_slug (required), description (required), source_branch (required), +3 more. Returns: result
create_issueCreate IssueB
Create a new issue in a repository's issue tracker.
Args: repo_slug: Repository slug title: Issue title content: Issue description in markdown (optional) kind: Issue kind: bug, enhancement, proposal, task (optional) priority: Issue priority: trivial, minor, major, critical, blocker (optional) assignee: Assignee uuid (optional) state: Initial state (optional, e.g. new, open) workspace: Workspace name (optional, defaults to configured workspace)
Returns: Created issue details. If the repository has no issue tracker, returns {"error": "issue_tracker_disabled", ...}.
Inputs: title (required), repo_slug (required), kind, state, +4 more. Returns: result
create_pull_requestCreate Pull RequestB
Create a new pull request.
Args: repo_slug: Repository slug title: Pull request title description: Pull request description source_branch: Source branch name target_branch: Target branch name workspace: Workspace name (optional, defaults to configured workspace) reviewers: List of reviewer UUIDs (optional) draft: Whether to create the pull request as a draft (default: False)
Returns: Created pull request details
Inputs: title (required), repo_slug (required), description (required), source_branch (required), +4 more. Returns: result
create_pull_request_taskCreate Pull Request TaskB
Create a task on a pull request, optionally linked to a specific comment.
Args: repo_slug: Repository slug pull_request_id: Pull request ID content: Task content in markdown format comment_id: Optional comment ID to link the task to a specific comment workspace: Workspace name (optional, defaults to configured workspace)
Returns: Created task details
Inputs: content (required), repo_slug (required), pull_request_id (required), workspace, +1 more. Returns: result
decline_pull_requestDecline Pull RequestBDestructive
Decline a pull request.
Args: repo_slug: Repository slug pull_request_id: Pull request ID workspace: Workspace name (optional, defaults to configured workspace) message: Reason for declining (optional)
Returns: Updated pull request details
Inputs: repo_slug (required), pull_request_id (required), message, workspace. Returns: result
delete_pull_request_commentDelete Pull Request CommentBDestructiveIdempotent
Delete a comment on a pull request.
Args: repo_slug: Repository slug pull_request_id: Pull request ID comment_id: Comment ID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Success message
Inputs: repo_slug (required), comment_id (required), pull_request_id (required), workspace. Returns: result
delete_pull_request_taskDelete Pull Request TaskBDestructiveIdempotent
Delete a task on a pull request.
Args: repo_slug: Repository slug pull_request_id: Pull request ID task_id: Task ID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Success message
Inputs: task_id (required), repo_slug (required), pull_request_id (required), workspace. Returns: result
get_branch_restrictionGet Branch RestrictionARead-onlyIdempotent
Get a single branch restriction.
Args: repo_slug: Repository slug restriction_id: Numeric restriction id workspace: Workspace name (optional, defaults to configured workspace)
Returns: Branch restriction details
Inputs: repo_slug (required), restriction_id (required), workspace. Returns: result
get_commitGet CommitARead-onlyIdempotent
Get details for a single commit.
Args: repo_slug: Repository slug commit: Commit hash (a simple branch/tag name also works) workspace: Workspace name (optional, defaults to configured workspace)
Returns: Commit details
Inputs: commit (required), repo_slug (required), workspace. Returns: result
get_commit_commentGet Commit CommentARead-onlyIdempotent
Get a specific comment on a commit.
Args: repo_slug: Repository slug commit: Commit hash comment_id: Comment ID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Commit comment details
Inputs: commit (required), repo_slug (required), comment_id (required), workspace. Returns: result
get_commit_commentsGet Commit CommentsARead-onlyIdempotent
List comments on a commit with pagination support.
Args: repo_slug: Repository slug commit: Commit hash workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 10) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of commit comments
Inputs: commit (required), repo_slug (required), max_pages, page_size, +1 more. Returns: result
get_commit_statusesGet Commit StatusesARead-onlyIdempotent
Get build/CI statuses for a specific commit (e.g. Jenkins, CI/CD).
Use this to check the Jenkins build status for any branch commit without needing to create a Pull Request first.
Args: repo_slug: Repository slug commit_hash: Commit hash (full or short, e.g. "abc1234") workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 10, max recommended: 100) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: List of build statuses (Jenkins, CI/CD, tests, etc.) Each status contains: - state: SUCCESSFUL, FAILED, INPROGRESS, STOPPED - key: Unique identifier for the build - name: Build name/description - description: Build result description - url: Link to the Jenkins build details - created_on: Timestamp of the status - updated_on: Timestamp of last update
Note: Requires Jenkins Bitbucket Build Status Notifier plugin to post statuses. Fetching more than 10 pages or 300 items will trigger a warning.
Inputs: repo_slug (required), commit_hash (required), max_pages, page_size, +1 more. Returns: result
get_deploymentGet DeploymentARead-onlyIdempotent
Get a single deployment (state, environment, deployed commit).
Requires the deployment OAuth scope.
Args: repo_slug: Repository slug deployment_uuid: Deployment UUID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Deployment details (state, status, environment, commit)
Inputs: repo_slug (required), deployment_uuid (required), workspace. Returns: result
get_effective_default_reviewersGet Default ReviewersARead-onlyIdempotent
Get effective default reviewers for a repository.
Args: repo_slug: Repository slug workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 30) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: List of default reviewers for the repository
Note: Fetching more than 10 pages or 300 items will trigger a warning.
Inputs: repo_slug (required), max_pages, page_size, workspace. Returns: result
get_environmentGet EnvironmentBRead-onlyIdempotent
Get a single deployment environment.
Requires the deployment OAuth scope.
Args: repo_slug: Repository slug environment_uuid: Environment UUID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Environment details
Inputs: repo_slug (required), environment_uuid (required), workspace. Returns: result
get_file_contentGet File ContentARead-onlyIdempotent
Get the raw text content of a file at a given commit or branch.
A metadata pre-check rejects directories, oversized files (> max_bytes) and binary files before downloading, to protect the token budget.
Args: repo_slug: Repository slug commit: Commit hash (a simple branch/tag name also works; a branch name containing '/' is ambiguous on /src — resolve it to a hash first) path: File path within the repository workspace: Workspace name (optional, defaults to configured workspace) max_bytes: Maximum file size to return (default: 262144 = 256 KiB)
Returns: File content as text
Inputs: path (required), commit (required), repo_slug (required), max_bytes, +1 more. Returns: result
get_issueGet IssueARead-onlyIdempotent
Get details for a specific issue.
Args: repo_slug: Repository slug issue_id: Issue ID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Issue details. If the repository has no issue tracker, returns {"error": "issue_tracker_disabled", ...}.
Inputs: issue_id (required), repo_slug (required), workspace. Returns: result
get_issue_commentGet Issue CommentARead-onlyIdempotent
Get a specific comment on an issue.
Args: repo_slug: Repository slug issue_id: Issue ID comment_id: Comment ID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Issue comment details. If the repository has no issue tracker, returns {"error": "issue_tracker_disabled", ...}.
Inputs: issue_id (required), repo_slug (required), comment_id (required), workspace. Returns: result
get_issue_commentsGet Issue CommentsARead-onlyIdempotent
List comments on an issue with pagination support.
Args: repo_slug: Repository slug issue_id: Issue ID workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 20, max recommended: 100) max_pages: Maximum pages to fetch (default: 1, max recommended: 10) max_items: Maximum total items to fetch (default: None)
Returns: Paginated list of issue comments. If the repository has no issue tracker, returns {"error": "issue_tracker_disabled", ...}.
Note: Fetching more than 10 pages or 300 items will trigger a warning.
Inputs: issue_id (required), repo_slug (required), max_items, max_pages, +2 more. Returns: result
get_pipeline_configGet Pipeline ConfigARead-onlyIdempotent
Get the repository pipelines configuration (enabled flag, next build number).
Note: this endpoint requires the admin:repository scope. A read-only token
receives a 403 listing the missing privilege.
Args: repo_slug: Repository slug workspace: Workspace name (optional, defaults to configured workspace)
Returns: Pipelines configuration (enabled, next_build_number)
Inputs: repo_slug (required), workspace. Returns: result
get_pipeline_runGet Pipeline RunARead-onlyIdempotent
Get details for a specific pipeline run.
Args: repo_slug: Repository slug pipeline_uuid: Pipeline UUID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Pipeline run details
Inputs: repo_slug (required), pipeline_uuid (required), workspace. Returns: result
get_pipeline_scheduleGet Pipeline ScheduleARead-onlyIdempotent
Get a single pipeline schedule.
Args: repo_slug: Repository slug schedule_uuid: Schedule UUID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Pipeline schedule
Inputs: repo_slug (required), schedule_uuid (required), workspace. Returns: result
get_pipeline_step_logsGet Pipeline Step LogsARead-onlyIdempotent
Get logs for a specific pipeline step.
Raw step logs are routinely multi-MB, so only the last max_bytes (100 KiB by
default) are returned. Check the truncated flag in the response and page
through the rest with start/end if you need more.
Reading the tail costs two requests: one to establish the log's size, one to
fetch the tail. Passing an explicit start/end window skips the first.
Args: repo_slug: Repository slug pipeline_uuid: Pipeline UUID, e.g. "{adab6a1f-...}". Unlike get_pipeline_run, this endpoint is not documented to accept a build number — resolve the UUID first via get_pipeline_run if you only have a number. step_uuid: Step UUID (from get_pipeline_steps) workspace: Workspace name (optional, defaults to configured workspace) log_uuid: Optional log UUID. Omit for the main build container; pass a service container UUID to read that service's log instead. start: First byte to return (absolute, inclusive) end: Last byte to return (absolute, inclusive). start/end are an absolute byte window, not a "last N bytes" convention. max_bytes: Size of the trailing slice returned when no start/end is given (default: 100 KiB). Pass null for the whole log.
Returns:
Dict with the log content, whether it was truncated, returned_bytes
and total_bytes (null when the server did not disclose the full size)
Inputs: repo_slug (required), step_uuid (required), pipeline_uuid (required), end, +4 more. Returns: result
get_pipeline_stepsGet Pipeline StepsARead-onlyIdempotent
List steps for a pipeline run with pagination support.
Args: repo_slug: Repository slug pipeline_uuid: Pipeline UUID workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 10, max recommended: 100) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: List of pipeline steps
Note: Fetching more than 10 pages or 300 items will trigger a warning.
Inputs: repo_slug (required), pipeline_uuid (required), max_pages, page_size, +1 more. Returns: result
get_pipeline_variableGet Pipeline VariableARead-onlyIdempotent
Get a single repository-level pipeline variable.
Args: repo_slug: Repository slug variable_uuid: Variable UUID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Pipeline variable (value is null if secured)
Inputs: repo_slug (required), variable_uuid (required), workspace. Returns: result
get_pull_requestGet Pull RequestARead-onlyIdempotent
Get details for a specific pull request.
Args: repo_slug: Repository slug pull_request_id: Pull request ID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Pull request details with comment statistics: - comment_stats: Object containing: - total (int): Total number of comments - resolved (int): Number of resolved comments - unresolved (int): Number of unresolved comments - source_commit / destination_commit (string or null): full 40-character hash of the PR head and of the destination branch tip, unlike the 12-character hashes elsewhere. null when the commit cannot be resolved (e.g. a deleted source branch, or a fork outside the allowed workspaces). Only this tool returns them. - participants[].state (string or null): "approved", "changes_requested" or null — the participant's current review status
Inputs: repo_slug (required), pull_request_id (required), workspace. Returns: result
get_pull_request_activityGet Pull Request ActivityARead-onlyIdempotent
Get activity log for a pull request with pagination support.
Args: repo_slug: Repository slug pull_request_id: Pull request ID workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 10, max recommended: 100) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns:
Activity log with all events. Each entry has a type: update, comment,
approval, changes_requested (date + user) or unknown. The log is history:
a participant's current review status is participants[].state from
get_pull_request. Comment objects enriched with resolution status:
- is_resolved (bool): True if comment is resolved
- resolved_by (string or null): User display name who resolved the comment
- resolved_on (string or null): Timestamp when comment was resolved
Note: Fetching more than 10 pages or 300 items will trigger a warning.
Inputs: repo_slug (required), pull_request_id (required), max_pages, page_size, +1 more. Returns: result
get_pull_request_commentGet Pull Request CommentARead-onlyIdempotent
Get a specific comment on a pull request.
Args: repo_slug: Repository slug pull_request_id: Pull request ID comment_id: Comment ID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Comment details with resolution status
Inputs: repo_slug (required), comment_id (required), pull_request_id (required), workspace. Returns: result
get_pull_request_commentsGet Pull Request CommentsARead-onlyIdempotent
List comments on a pull request with pagination support.
Args: repo_slug: Repository slug pull_request_id: Pull request ID workspace: Workspace name (optional, defaults to configured workspace) unresolved_only: If true, returns only unresolved comments (default: False) page_size: Items per page (default: 10, max recommended: 100) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: List of comments enriched with resolution status: - is_resolved (bool): True if comment is resolved - resolved_by (string or null): User display name who resolved the comment - resolved_on (string or null): Timestamp when comment was resolved
Note: Fetching more than 10 pages or 300 items will trigger a warning.
Inputs: repo_slug (required), pull_request_id (required), max_pages, page_size, +2 more. Returns: result
get_pull_request_commitsGet Pull Request CommitsARead-onlyIdempotent
Get commits on a pull request with pagination support.
Args: repo_slug: Repository slug pull_request_id: Pull request ID workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 10, max recommended: 100) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: List of commits
Note: Fetching more than 10 pages or 300 items will trigger a warning.
Inputs: repo_slug (required), pull_request_id (required), max_pages, page_size, +1 more. Returns: result
get_pull_request_diffGet Pull Request DiffARead-onlyIdempotent
Get diff for a pull request.
Args: repo_slug: Repository slug pull_request_id: Pull request ID workspace: Workspace name (optional, defaults to configured workspace) path: Filter diff to a specific file path to reduce token usage (optional). Example: "src/middlewares/authorizationMiddleware.ts"
Returns: Unified diff as string
Inputs: repo_slug (required), pull_request_id (required), path, workspace. Returns: result
get_pull_request_diffstatGet Pull Request DiffstatARead-onlyIdempotent
Get file modification statistics for a pull request with pagination support.
Args: repo_slug: Repository slug pull_request_id: Pull request ID workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 10, max recommended: 100) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Statistics with lines added/removed per file Each file entry contains: - status: modified, added, removed, renamed - lines_added: Number of lines added - lines_removed: Number of lines removed - new.path: File path after changes
Note: Fetching more than 10 pages or 300 items will trigger a warning.
Inputs: repo_slug (required), pull_request_id (required), max_pages, page_size, +1 more. Returns: result
get_pull_request_review_summaryGet Pull Request Review SummaryARead-onlyIdempotent
Get a comprehensive review summary for a pull request.
Fetches PR details first, then aggregates diffstat, unresolved comments, and CI statuses in parallel for efficient AI-assisted code review.
Args: repo_slug: Repository slug pull_request_id: Pull request ID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Structured summary with pr details, diffstat, unresolved comments, CI statuses, and review readiness assessment. review_readiness: merged | declined | draft | ci_failing | ci_pending | has_unresolved_comments | ready
Inputs: repo_slug (required), pull_request_id (required), workspace. Returns: result
get_pull_requestsGet Pull RequestsARead-onlyIdempotent
Get pull requests for a repository with pagination support.
Args: repo_slug: Repository slug workspace: Workspace name (optional, defaults to configured workspace) state: Pull request state (OPEN, MERGED, DECLINED, SUPERSEDED) (default: OPEN) page_size: Items per page (default: 30) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of pull requests
Note: Fetching more than 10 pages or 300 items will trigger a warning.
Inputs: repo_slug (required), state, max_pages, page_size, +1 more. Returns: result
get_pull_requests_pending_reviewList Pull Requests Pending ReviewARead-onlyIdempotent
Get open pull requests where the current user is a reviewer.
Use this to find PRs that need your review attention.
Args: repo_slug: Repository slug workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 30) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of pull requests pending your review
Inputs: repo_slug (required), max_pages, page_size, workspace. Returns: result
get_pull_request_statusesGet Pull Request StatusesARead-onlyIdempotent
Get build/CI statuses for a pull request with pagination support.
Args: repo_slug: Repository slug pull_request_id: Pull request ID workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 10, max recommended: 100) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: List of build statuses (Jenkins, CI/CD, tests, etc.) Each status contains: - state: SUCCESSFUL, FAILED, INPROGRESS, STOPPED - key: Unique identifier for the build - name: Build name/description - url: Link to the build details - created_on: Timestamp of the status
Note: Fetching more than 10 pages or 300 items will trigger a warning.
Inputs: repo_slug (required), pull_request_id (required), max_pages, page_size, +1 more. Returns: result
get_pull_request_taskGet Pull Request TaskARead-onlyIdempotent
Get a specific task on a pull request.
Args: repo_slug: Repository slug pull_request_id: Pull request ID task_id: Task ID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Task details with state, content, creator, resolution info
Inputs: task_id (required), repo_slug (required), pull_request_id (required), workspace. Returns: result
get_pull_request_tasksGet Pull Request TasksARead-onlyIdempotent
List tasks on a pull request with pagination support.
Args: repo_slug: Repository slug pull_request_id: Pull request ID workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 10, max recommended: 100) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of tasks with state, content, creator info
Inputs: repo_slug (required), pull_request_id (required), max_pages, page_size, +1 more. Returns: result
get_repositoryGet RepositoryARead-onlyIdempotent
Get repository details.
Args: repo_slug: Repository slug workspace: Workspace name (optional, defaults to configured workspace)
Returns: Repository information
Inputs: repo_slug (required), workspace. Returns: result
get_repository_tagsGet Repository TagsARead-onlyIdempotent
List repository tags ordered by most recent target date.
Note: "target date" is the date of the tag's target commit, not the tag creation date — a tag placed on an old commit will not sort first.
Args: repo_slug: Repository slug workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 10) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of repository tags
Inputs: repo_slug (required), max_pages, page_size, workspace. Returns: result
get_workspace_memberGet Workspace MemberARead-onlyIdempotent
Get a single workspace member.
Requires the account scope.
Args: member_id: Member account_id or brace-wrapped uuid (not a username) workspace: Workspace name (optional, defaults to configured workspace)
Returns: Workspace membership details
Inputs: member_id (required), workspace. Returns: result
list_branch_restrictionsList Branch RestrictionsARead-onlyIdempotent
List branch restrictions (branch protection rules) for a repository.
Requires the repository scope (or repository:admin depending on the repo
configuration).
Args:
repo_slug: Repository slug
kind: Optional filter by restriction type (e.g. push, require_approvals_to_merge)
workspace: Workspace name (optional, defaults to configured workspace)
page_size: Items per page (default: 30)
max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of branch restrictions
Inputs: repo_slug (required), kind, max_pages, page_size, +1 more. Returns: result
list_commitsList CommitsARead-onlyIdempotent
List commits for a repository, optionally scoped to a revision or path.
Args: repo_slug: Repository slug revision: Branch, tag or commit hash to start from (optional; defaults to all branches). A branch name containing '/' is ambiguous here — resolve it to a commit hash first (e.g. via get_branch) if listing fails. workspace: Workspace name (optional, defaults to configured workspace) path: Restrict history to commits touching this file/directory path include: Only commits reachable from this ref exclude: Exclude commits reachable from this ref page_size: Items per page (default: 30) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of commits
Inputs: repo_slug (required), path, exclude, include, +4 more. Returns: result
list_deploymentsList DeploymentsARead-onlyIdempotent
List deployments for a repository (deployment history, most recent first).
The Bitbucket API cannot filter deployments by environment server-side; filter
on the environment field of the returned items instead. Requires the
deployment OAuth scope.
Args: repo_slug: Repository slug workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 20) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of deployments
Inputs: repo_slug (required), max_pages, page_size, workspace. Returns: result
list_deployment_variablesList Deployment VariablesARead-onlyIdempotent
List the variables of a deployment environment.
Secured variables never expose their value (returned as null). Requires the
deployment OAuth scope.
Args: repo_slug: Repository slug environment_uuid: Environment UUID workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 20) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of deployment variables
Inputs: repo_slug (required), environment_uuid (required), max_pages, page_size, +1 more. Returns: result
list_directoryList DirectoryARead-onlyIdempotent
List the entries (files and sub-directories) of a directory at a commit/branch.
Args: repo_slug: Repository slug commit: Commit hash (a simple branch/tag name also works) path: Directory path within the repository (empty = repository root) workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 50) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated directory listing (path, type, size, mimetype per entry)
Inputs: commit (required), repo_slug (required), path, max_pages, +2 more. Returns: result
list_environmentsList EnvironmentsARead-onlyIdempotent
List deployment environments (staging, production, etc.) for a repository.
Requires the deployment OAuth scope.
Args: repo_slug: Repository slug workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 20) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of environments
Inputs: repo_slug (required), max_pages, page_size, workspace. Returns: result
list_issuesList IssuesARead-onlyIdempotent
List issues in a repository's issue tracker, with filtering and pagination.
Args: repo_slug: Repository slug workspace: Workspace name (optional, defaults to configured workspace) state: Filter by state (new, open, resolved, on hold, invalid, duplicate, wontfix, closed) kind: Filter by kind (bug, enhancement, proposal, task) priority: Filter by priority (trivial, minor, major, critical, blocker) assignee: Filter by assignee uuid q: Raw BBQL query, combined with the other filters using AND (e.g. 'created_on > 2024-01-01'). Passed through verbatim (not escaped). sort: Sort field (default: -created_on for most recent first) page_size: Items per page (default: 20) max_pages: Maximum pages to fetch (default: 1, max recommended: 10) max_items: Maximum total items to fetch (default: None)
Returns: Paginated list of issues. If the repository has no issue tracker, returns {"error": "issue_tracker_disabled", ...}.
Note: Fetching more than 10 pages or 300 items will trigger a warning.
Inputs: repo_slug (required), q, kind, sort, +7 more. Returns: result
list_pipeline_cachesList Pipeline CachesARead-onlyIdempotent
List pipeline caches for a repository.
Args: repo_slug: Repository slug workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 20) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of pipeline caches
Inputs: repo_slug (required), max_pages, page_size, workspace. Returns: result
list_pipeline_runsList Pipeline RunsARead-onlyIdempotent
List pipeline runs for a repository with pagination support.
Args: repo_slug: Repository slug workspace: Workspace name (optional, defaults to configured workspace) status: Filter pipelines by status (PENDING, IN_PROGRESS, SUCCESSFUL, FAILED, ERROR, STOPPED) target_branch: Filter pipelines by target branch page_size: Items per page (default: 30) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: List of pipeline runs
Note: Fetching more than 10 pages or 300 items will trigger a warning.
Inputs: repo_slug (required), status, max_pages, page_size, +2 more. Returns: result
list_pipeline_schedule_executionsList Schedule ExecutionsARead-onlyIdempotent
List the executions of a pipeline schedule.
Args: repo_slug: Repository slug schedule_uuid: Schedule UUID workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 20) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of schedule executions
Inputs: repo_slug (required), schedule_uuid (required), max_pages, page_size, +1 more. Returns: result
list_pipeline_schedulesList Pipeline SchedulesARead-onlyIdempotent
List pipeline schedules for a repository.
Args: repo_slug: Repository slug workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 20) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of pipeline schedules
Inputs: repo_slug (required), max_pages, page_size, workspace. Returns: result
list_pipeline_variablesList Pipeline VariablesARead-onlyIdempotent
List repository-level pipeline variables.
Secured variables never expose their value (returned as null).
Args: repo_slug: Repository slug workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 20) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of pipeline variables
Inputs: repo_slug (required), max_pages, page_size, workspace. Returns: result
list_repositoriesList RepositoriesARead-onlyIdempotent
List repositories in workspace with pagination support.
Args: workspace: Workspace name (optional, defaults to configured workspace) name: Filter by repository name (partial match supported) page_size: Items per page (default: 30) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of repositories
Note: Fetching more than 10 pages or 300 items will trigger a warning.
Inputs: name, max_pages, page_size, workspace. Returns: result
list_repository_permissionsList Repository PermissionsARead-onlyIdempotent
List the user permissions for a specific repository in the workspace.
Requires the account scope.
Args: repo_slug: Repository slug workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 30) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of repository permissions (permission + user)
Inputs: repo_slug (required), max_pages, page_size, workspace. Returns: result
list_workspace_membersList Workspace MembersARead-onlyIdempotent
List the members of a workspace.
The members endpoint carries no per-user permission — use
list_workspace_permissions for roles. Requires the account scope.
Args: workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 30) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of workspace memberships
Inputs: max_pages, page_size, workspace. Returns: result
list_workspace_permissionsList Workspace PermissionsARead-onlyIdempotent
List the user permissions (roles) of a workspace.
Requires the account scope.
Args: workspace: Workspace name (optional, defaults to configured workspace) page_size: Items per page (default: 30) max_pages: Maximum pages to fetch (default: 1, max recommended: 10)
Returns: Paginated list of workspace permissions (permission + user)
Inputs: max_pages, page_size, workspace. Returns: result
publish_draft_pull_requestPublish Draft Pull RequestAIdempotent
Publish a draft pull request (convert DRAFT to OPEN).
Args: repo_slug: Repository slug pull_request_id: Pull request ID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Updated pull request details
Inputs: repo_slug (required), pull_request_id (required), workspace. Returns: result
reopen_pull_request_commentReopen Pull Request CommentBIdempotent
Reopen (unresolve) a comment on a pull request.
Args: repo_slug: Repository slug pull_request_id: Pull request ID comment_id: Comment ID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Success message
Inputs: repo_slug (required), comment_id (required), pull_request_id (required), workspace. Returns: result
request_changes_pull_requestRequest Changes on Pull RequestAIdempotent
Request changes on a pull request (sets reviewer status to 'needs work').
Args: repo_slug: Repository slug pull_request_id: Pull request ID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Participant details with updated state
Inputs: repo_slug (required), pull_request_id (required), workspace. Returns: result
resolve_pull_request_commentResolve Pull Request CommentBIdempotent
Resolve a comment on a pull request.
Args: repo_slug: Repository slug pull_request_id: Pull request ID comment_id: Comment ID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Resolution details
Inputs: repo_slug (required), comment_id (required), pull_request_id (required), workspace. Returns: result
run_pipelineRun PipelineA
Trigger a new pipeline run on a branch.
Args: repo_slug: Repository slug branch: Branch name to run the pipeline on workspace: Workspace name (optional, defaults to configured workspace)
Returns: Created pipeline run details
Inputs: branch (required), repo_slug (required), workspace. Returns: result
submit_pull_request_batch_reviewSubmit Batch ReviewA
Submit a batch review on a pull request: post multiple comments and optionally approve or request changes.
Note: Bitbucket API does not support pending/draft comments in batch. Each comment is posted immediately.
Args: repo_slug: Repository slug pull_request_id: Pull request ID comments: List of comment objects. Each comment has: - content (str, required): Comment text in markdown - inline (dict, optional): For inline comments: {"path": str, "to": int, "from": int} review_action: Action after posting comments: "approve", "request_changes", or "comment_only" (default: "comment_only") review_message: General review message posted as a top-level comment (optional) workspace: Workspace name (optional, defaults to configured workspace)
Returns: Summary with comments_posted count, action taken, and PR details
Inputs: comments (required), repo_slug (required), pull_request_id (required), workspace, +2 more. Returns: result
suggest_pull_request_reviewersSuggest Pull Request ReviewersARead-onlyIdempotent
Suggest reviewers for a pull request based on default reviewers and recent PR history.
Combines default reviewers with frequent approvers from recently merged PRs to suggest the most relevant reviewers.
Args: repo_slug: Repository slug pull_request_id: Pull request ID max_suggestions: Maximum number of reviewer suggestions (default: 5) workspace: Workspace name (optional, defaults to configured workspace)
Returns: Suggested reviewers with scores and reasons, already-assigned reviewers, and data sources
Inputs: repo_slug (required), pull_request_id (required), workspace, max_suggestions. Returns: result
unapprove_pull_requestUnapprove Pull RequestAIdempotent
Remove approval from a pull request.
Args: repo_slug: Repository slug pull_request_id: Pull request ID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Success message
Inputs: repo_slug (required), pull_request_id (required), workspace. Returns: result
unrequest_changes_pull_requestWithdraw Change RequestAIdempotent
Remove 'request changes' status from a pull request.
Args: repo_slug: Repository slug pull_request_id: Pull request ID workspace: Workspace name (optional, defaults to configured workspace)
Returns: Success message
Inputs: repo_slug (required), pull_request_id (required), workspace. Returns: result
update_issueUpdate IssueAIdempotent
Update an issue (only the provided fields are changed).
Args: repo_slug: Repository slug issue_id: Issue ID title: New title (optional) content: New description in markdown (optional) state: New state: new, open, resolved, on hold, invalid, duplicate, wontfix, closed (optional) kind: New kind: bug, enhancement, proposal, task (optional) priority: New priority: trivial, minor, major, critical, blocker (optional) assignee: New assignee uuid (optional) workspace: Workspace name (optional, defaults to configured workspace)
Returns: Updated issue details. If the repository has no issue tracker, returns {"error": "issue_tracker_disabled", ...}.
Inputs: issue_id (required), repo_slug (required), kind, state, +5 more. Returns: result
update_issue_commentUpdate Issue CommentBIdempotent
Update a comment on an issue.
Args: repo_slug: Repository slug issue_id: Issue ID comment_id: Comment ID content: New comment content in markdown workspace: Workspace name (optional, defaults to configured workspace)
Returns: Updated issue comment details. If the repository has no issue tracker, returns {"error": "issue_tracker_disabled", ...}.
Inputs: content (required), issue_id (required), repo_slug (required), comment_id (required), +1 more. Returns: result
update_pull_requestUpdate Pull RequestAIdempotent
Update a pull request.
Args: repo_slug: Repository slug pull_request_id: Pull request ID workspace: Workspace name (optional, defaults to configured workspace) title: New pull request title (optional) description: New pull request description (optional) reviewers: Complete list of reviewer UUIDs to set on the PR (optional). WARNING: this REPLACES the entire reviewer list — include all existing reviewers you want to keep, plus any new ones. Use get_pull_request first to retrieve current reviewer UUIDs. Pass [] to clear all reviewers.
Returns: Updated pull request details
Inputs: repo_slug (required), pull_request_id (required), title, reviewers, +2 more. Returns: result
update_pull_request_commentUpdate Pull Request CommentAIdempotent
Update a comment on a pull request.
Args: repo_slug: Repository slug pull_request_id: Pull request ID comment_id: Comment ID content: New comment content in markdown format workspace: Workspace name (optional, defaults to configured workspace)
Returns: Updated comment details
Inputs: content (required), repo_slug (required), comment_id (required), pull_request_id (required), +1 more. Returns: result
update_pull_request_taskUpdate Pull Request TaskAIdempotent
Update a pull request task (content and/or state).
Args: repo_slug: Repository slug pull_request_id: Pull request ID task_id: Task ID content: New task content in markdown format (optional) state: New task state: UNRESOLVED or RESOLVED (optional) workspace: Workspace name (optional, defaults to configured workspace)
Returns: Updated task details
Inputs: task_id (required), repo_slug (required), pull_request_id (required), state, +2 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 74 tools
Despite 74 tools, most have a distinct resource+action target (PRs, issues, commits, files, pipelines, deployments, permissions). A few overlap: create_draft_pull_request is a subset of create_pull_request's draft flag, get_pull_request_comment(s) singular/plural are easy to mix up, and submit_pull_request_batch_review partially duplicates add_pull_request_comment + approve_pull_request, though its aggregation purpose is documented.
The dominant pattern is verb_noun (create_pull_request, resolve_pull_request_comment), which is followed widely. However, list operations are inconsistently named: list_repositories/list_commits/list_issues vs get_repository_tags/get_pull_request_comments/get_commit_comments/get_effective_default_reviewers, which all return collections. The get_/list_ distinction becomes unreliable for selection.
74 tools is far beyond the 25+ threshold and is a very heavy surface for an agent to navigate, even given Bitbucket's broad domain. Several niche areas (deployment variables, pipeline caches, schedule executions, branch restrictions) each consume tool slots, increasing selection cost.
Read coverage is excellent across PRs, issues, commits, files, pipelines, deployments, and permissions, but the write surface has notable gaps: there is no merge_pull_request (only decline), no repository/branch create-update-delete, and pipeline variables/schedules/environments are read-only. These omissions block common lifecycle workflows.
Maintenance
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Plan Salesforce deploys, open pull requests and trigger pipelines from your AI client.
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with Bitbucket Cloud repositories, allowing users to manage pull requests, comments, tasks, and branches through natural language commands.5,856 npm1MIT
- AlicenseBqualityBmaintenanceEnables AI assistants to interact with Bitbucket Cloud and self-hosted instances for pull request reviews, code search, repository operations, and managing PR comments and approvals.19GPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to programmatically manage Bitbucket Cloud resources, including pull requests, repositories, and branches, automating code review workflows.16 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to list and retrieve repositories, fetch and create pull requests, and work with Bitbucket Cloud and Server APIs.5,856 npmMIT