0.1.7npm · @mcpkits/bitbucket · current release
Observed 2026-09-04T23:37:13.784Z using mcpSecurity-inventory. Status: succeeded. Negotiated protocol: 2025-06-18.
{
"tools": {
"listChanged": true
}
}| Tool | Category | Annotations | Risk |
|---|---|---|---|
add_pr_commentPost a general comment on a pull request (not tied to a specific file or line). For inline file/line comments, use `add_pr_inline_comment`.Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"workspace": {
"description": "Bitbucket workspace (slug).",
"type": "string"
},
"repo": {
"description": "Bitbucket repo slug.",
"type": "string"
},
"pr_id": {
"description": "Pull request id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"body": {
"type": "string",
"minLength": 1,
"description": "Comment body (Markdown)."
}
},
"required": [
"body"
]
}Annotations{
"title": "Add PR comment",
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": false,
"openWorldHint": true
} | — | Writes · Non-destructive | — |
add_pr_inline_commentPost a comment on a specific file and line within a pull request's diff. Use `get_pr_diff` first if you need to confirm line numbers are present in the diff. For general PR comments, use `add_pr_comment`.Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"workspace": {
"description": "Bitbucket workspace (slug).",
"type": "string"
},
"repo": {
"description": "Bitbucket repo slug.",
"type": "string"
},
"pr_id": {
"description": "Pull request id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"body": {
"type": "string",
"minLength": 1,
"description": "Comment body (Markdown)."
},
"path": {
"type": "string",
"minLength": 1,
"description": "Repo-relative file path."
},
"line": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991,
"description": "Line number (1-based)."
},
"side": {
"description": "Which side of the diff to anchor to. Default `new` (the PR's version).",
"type": "string",
"enum": [
"new",
"old"
]
}
},
"required": [
"body",
"path",
"line"
]
}Annotations{
"title": "Add PR inline comment",
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": false,
"openWorldHint": true
} | — | Writes · Non-destructive | — |
create_prOpen a new pull request. `source_branch` defaults to the current git branch when run from inside a checkout. `destination_branch` defaults to the repository's configured main branch on Bitbucket. `description` is interpreted as Markdown. `reviewers` is a list of Bitbucket account UUIDs (including the curly braces).Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"workspace": {
"description": "Bitbucket workspace (slug).",
"type": "string"
},
"repo": {
"description": "Bitbucket repo slug.",
"type": "string"
},
"title": {
"type": "string",
"minLength": 1,
"description": "PR title."
},
"source_branch": {
"description": "Source branch name. Defaults to the current git branch.",
"type": "string",
"minLength": 1
},
"destination_branch": {
"description": "Destination branch name. Defaults to the repo's main branch.",
"type": "string",
"minLength": 1
},
"description": {
"description": "PR description (Markdown).",
"type": "string"
},
"close_source_branch": {
"description": "If true, the source branch is deleted on merge.",
"type": "boolean"
},
"reviewers": {
"description": "Reviewer account UUIDs (e.g. `{abcd-...}`).",
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
},
"required": [
"title"
]
}Annotations{
"title": "Create PR",
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": false,
"openWorldHint": true
} | — | Writes · Non-destructive | — |
get_build_statusAnswer "is this commit green?" in one call, using Bitbucket's commit build statuses (Pipelines results plus anything else that posts a status). Pass `commit` (a SHA) or `pr_id`; with neither, it uses the current checkout's HEAD. `verdict` is FAILED / INPROGRESS / STOPPED / SUCCESSFUL / NO_STATUSES. NO_STATUSES means nothing posted a status — check `list_pipelines` before concluding a build did not run.Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"workspace": {
"description": "Bitbucket workspace (slug).",
"type": "string"
},
"repo": {
"description": "Bitbucket repo slug.",
"type": "string"
},
"pr_id": {
"description": "Pull request id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"commit": {
"description": "Commit SHA. Defaults to the checkout's HEAD.",
"type": "string",
"minLength": 4
}
}
}Annotations{
"title": "Get build status",
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
} | — | Read only · Non-destructive | — |
get_pipeline_step_logFetch the log output of a pipeline step. `pipeline_uuid` accepts either a pipeline UUID or a plain build number (e.g. 27419); UUIDs work with or without curly braces. Omit `step_uuid` to get the first failed step's log (or the last step when everything passed). Use `tail_lines` when you only need the end of the log — that is where failures are. Output is capped at `max_bytes` (default 100 KB), keeping the end of the log. If you only need whether a step passed, use `list_pipelines` instead — it returns step state without any log.Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"workspace": {
"description": "Bitbucket workspace (slug).",
"type": "string"
},
"repo": {
"description": "Bitbucket repo slug.",
"type": "string"
},
"pipeline_uuid": {
"type": "string",
"minLength": 1,
"description": "Pipeline UUID or build number."
},
"step_uuid": {
"description": "Step UUID. Defaults to the first failed step, else the last step.",
"type": "string",
"minLength": 1
},
"tail_lines": {
"description": "Return only the last N lines of the log.",
"type": "integer",
"minimum": 1,
"maximum": 100000
},
"max_bytes": {
"description": "Maximum log bytes to return, keeping the end. Default 100000.",
"type": "integer",
"minimum": 1000,
"maximum": 5000000
}
},
"required": [
"pipeline_uuid"
]
}Annotations{
"title": "Get pipeline step log",
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
} | — | Read only · Non-destructive | — |
get_prFetch a Bitbucket pull request's metadata (title, state, author, branches, description, URL).Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"workspace": {
"description": "Bitbucket workspace (slug).",
"type": "string"
},
"repo": {
"description": "Bitbucket repo slug.",
"type": "string"
},
"pr_id": {
"description": "Pull request id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
}
}Annotations{
"title": "Get PR",
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
} | — | Read only · Non-destructive | — |
get_pr_diffFetch the unified diff for a pull request. For a large PR, start with `stat_only: true` to see which files changed and how big the diff is, then pass `paths` to fetch only the parts you need. Output is capped at `max_bytes` (default 100 KB) and the tail is dropped with a note when it overflows.Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"workspace": {
"description": "Bitbucket workspace (slug).",
"type": "string"
},
"repo": {
"description": "Bitbucket repo slug.",
"type": "string"
},
"pr_id": {
"description": "Pull request id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"paths": {
"description": "Limit the diff to these files or directories (repo-relative; a directory matches everything under it).",
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"stat_only": {
"description": "Return a per-file summary (status, lines added/removed) plus totals instead of the diff text.",
"type": "boolean"
},
"max_bytes": {
"description": "Maximum diff bytes to return. Default 100000.",
"type": "integer",
"minimum": 1000,
"maximum": 5000000
}
}
}Annotations{
"title": "Get PR diff",
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
} | — | Read only · Non-destructive | — |
list_pipelinesFind Bitbucket Pipelines builds and their per-step pass/fail state. Scope it with `build_number` (exact build), `commit` (SHA, short or full), `branch`, or `pr_id` — with none of those it uses the PR for the current branch. PR lookups do not require the repo to have a `pull-requests:` trigger: when no pipeline is attributable to the PR, this falls back to the most recent pipelines on the PR's source branch and says so in `match` and `note`. `match: "none"` means no pipeline ran at all — distinct from a fallback. Steps include their UUIDs, so this is where you get the arguments for `get_pipeline_step_log`.Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"workspace": {
"description": "Bitbucket workspace (slug).",
"type": "string"
},
"repo": {
"description": "Bitbucket repo slug.",
"type": "string"
},
"pr_id": {
"description": "Pull request id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"branch": {
"description": "Branch name to list pipelines for.",
"type": "string",
"minLength": 1
},
"commit": {
"description": "Commit SHA (short or full) to find pipelines for.",
"type": "string",
"minLength": 4
},
"build_number": {
"description": "Fetch one specific build by its build number (e.g. 27419).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Maximum number of pipelines to return, newest first. Default 5.",
"type": "integer",
"minimum": 1,
"maximum": 50
},
"include_steps": {
"description": "Include each pipeline's steps. Default true; set false for a cheaper answer.",
"type": "boolean"
}
}
}Annotations{
"title": "List pipelines",
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
} | — | Read only · Non-destructive | — |
list_pr_commentsList all comments on a pull request, including general and inline (file+line) comments. Returns comments sorted oldest-first.Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"workspace": {
"description": "Bitbucket workspace (slug).",
"type": "string"
},
"repo": {
"description": "Bitbucket repo slug.",
"type": "string"
},
"pr_id": {
"description": "Pull request id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Maximum number of comments to return. Default 100.",
"type": "integer",
"minimum": 1,
"maximum": 500
}
}
}Annotations{
"title": "List PR comments",
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
} | — | Read only · Non-destructive | — |
list_prsList pull requests in a Bitbucket repository. Filter by state, author UUID, or branch. Returns up to `limit` results sorted newest first.Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"workspace": {
"description": "Bitbucket workspace (slug).",
"type": "string"
},
"repo": {
"description": "Bitbucket repo slug.",
"type": "string"
},
"state": {
"description": "PR state filter. Default OPEN.",
"type": "string",
"enum": [
"OPEN",
"MERGED",
"DECLINED",
"SUPERSEDED"
]
},
"author": {
"description": "Author UUID filter.",
"type": "string"
},
"branch": {
"description": "Source branch filter.",
"type": "string"
},
"limit": {
"description": "Maximum number of PRs to return. Default 20.",
"type": "integer",
"minimum": 1,
"maximum": 50
}
}
}Annotations{
"title": "List PRs",
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
} | — | Read only · Non-destructive | — |
reply_to_pr_commentReply to an existing PR comment, creating a threaded reply. For inline comments, the path and line are inherited from the parent — do not use `add_pr_inline_comment` to reply, since that posts a sibling comment instead of a threaded reply.Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"workspace": {
"description": "Bitbucket workspace (slug).",
"type": "string"
},
"repo": {
"description": "Bitbucket repo slug.",
"type": "string"
},
"pr_id": {
"description": "Pull request id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"comment_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "ID of the comment to reply to."
},
"body": {
"type": "string",
"minLength": 1,
"description": "Reply body (Markdown)."
}
},
"required": [
"comment_id",
"body"
]
}Annotations{
"title": "Reply to PR comment",
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": false,
"openWorldHint": true
} | — | Writes · Non-destructive | — |
resolve_pr_commentMark a PR comment as resolved or unresolved. Defaults to resolved=true. Use `list_pr_comments` to see current resolution state.Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"workspace": {
"description": "Bitbucket workspace (slug).",
"type": "string"
},
"repo": {
"description": "Bitbucket repo slug.",
"type": "string"
},
"pr_id": {
"description": "Pull request id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"comment_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "ID of the comment to (un)resolve."
},
"resolved": {
"description": "True to mark resolved (default), false to unresolve.",
"type": "boolean"
}
},
"required": [
"comment_id"
]
}Annotations{
"title": "Resolve PR comment",
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
} | — | Writes · Non-destructive | — |
run_pipelineStart a Bitbucket pipeline — a re-run of a branch's build, or a definition from the `custom:` section of bitbucket-pipelines.yml. `branch` defaults to the current git branch; `commit` pins the build to a specific SHA instead of the branch tip. Consumes build minutes and can deploy, so confirm with the user before running a custom pipeline you did not pick out together. Requires the `pipeline:write` OAuth scope (re-run `bitbucket-mcp setup` if the server was set up before that scope existed).Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"workspace": {
"description": "Bitbucket workspace (slug).",
"type": "string"
},
"repo": {
"description": "Bitbucket repo slug.",
"type": "string"
},
"branch": {
"description": "Branch to build. Defaults to the current git branch.",
"type": "string",
"minLength": 1
},
"commit": {
"description": "Commit SHA to build. Defaults to the branch tip.",
"type": "string",
"minLength": 7
},
"custom_pipeline": {
"description": "Name of a definition under `custom:` in bitbucket-pipelines.yml.",
"type": "string",
"minLength": 1
},
"variables": {
"description": "Variables to pass to the build.",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"minLength": 1,
"description": "Variable name."
},
"value": {
"type": "string",
"description": "Variable value."
},
"secured": {
"description": "If true, the value is masked in the build log.",
"type": "boolean"
}
},
"required": [
"key",
"value"
]
}
}
}
}Annotations{
"title": "Run pipeline",
"readOnlyHint": false,
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": true
} | — | Writes · Destructive | — |
set_pr_draft_stateMark a pull request as draft or ready for review. Pass `draft: true` to convert to draft, or `draft: false` to mark ready.Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"workspace": {
"description": "Bitbucket workspace (slug).",
"type": "string"
},
"repo": {
"description": "Bitbucket repo slug.",
"type": "string"
},
"pr_id": {
"description": "Pull request id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"draft": {
"type": "boolean",
"description": "True to mark as draft, false to mark ready for review."
}
},
"required": [
"draft"
]
}Annotations{
"title": "Set PR draft state",
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
} | — | Writes · Non-destructive | — |
update_prUpdate a pull request's title, description (the PR Overview), and/or reviewers. Pass any combination — fields you omit are left unchanged. The description is interpreted as Markdown. `reviewers` replaces the full reviewer list with the given Bitbucket account UUIDs (including the curly braces); pass an empty array to clear all reviewers.Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"workspace": {
"description": "Bitbucket workspace (slug).",
"type": "string"
},
"repo": {
"description": "Bitbucket repo slug.",
"type": "string"
},
"pr_id": {
"description": "Pull request id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"title": {
"description": "New PR title.",
"type": "string",
"minLength": 1
},
"description": {
"description": "New PR description (Markdown). Pass an empty string to clear it.",
"type": "string"
},
"reviewers": {
"description": "Reviewer account UUIDs (e.g. `{abcd-...}`). Replaces the entire reviewer list. Pass `[]` to clear all reviewers.",
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
}
}Annotations{
"title": "Update PR",
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": false,
"openWorldHint": true
} | — | Writes · Non-destructive | — |