mcp-server-atlassian-bitbucket

v3.1.0
@aashari/mcp-server-atlassian-bitbucket Checked 16 hours ago Published 9 months ago

Node.js/TypeScript MCP server for Atlassian Bitbucket.

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

bb_get Bitbucket GET Request

Read any Bitbucket data. Returns TOON format by default (30-60% fewer tokens than JSON). **IMPORTANT - Cost Optimization:** - ALWAYS use `jq` param to filter response fields. Unfiltered responses are very expensive! - Use `pagelen` query param to restrict result count (e.g., `pagelen: "5"`) - If unsure about available fields, first fetch ONE item with `pagelen: "1"` and NO jq filter to explore the schema, then use jq in subsequent calls **Schema Discovery Pattern:** 1. First call: `path: "/workspaces", queryParams: {"pagelen": "1"}` (no jq) - explore available fields 2. Then use: `jq: "value…

ParameterTypeDescription
path *stringThe Bitbucket API endpoint path (without base URL). Must start with "/". Examples: "/workspaces", "/repositories/{workspace}/{repo_slug}", "/repositories/{workspace}/{repo_slug}/pullrequests/{id}"
jqstringJMESPath expression to filter/transform the response. IMPORTANT: Always use this to extract only needed fields and reduce token costs. Examples: "values[*].{name: name, slug: slug}" (extract specific…
outputFormatstringOutput format: "toon" (default, 30-60% fewer tokens) or "json". TOON is optimized for LLMs with tabular arrays and minimal syntax.
queryParamsobjectOptional query parameters as key-value pairs. Examples: {"pagelen": "25", "page": "2", "q": "state=\"OPEN\"", "fields": "values.title,values.state"}

bb_post Bitbucket POST Request

Create Bitbucket resources. Returns TOON format by default (token-efficient). **IMPORTANT - Cost Optimization:** - Use `jq` param to extract only needed fields from response (e.g., `jq: "{id: id, title: title}"`) - Unfiltered responses include all metadata and are expensive! **Output format:** TOON (default) or JSON (`outputFormat: "json"`) **Common operations:** 1. **Create PR:** `/repositories/{workspace}/{repo}/pullrequests` body: `{"title": "...", "source": {"branch": {"name": "feature"}}, "destination": {"branch": {"name": "main"}}}` 2. **Add PR comment:** `/repositories/{workspac…

ParameterTypeDescription
body *objectRequest body as a JSON object. Structure depends on the endpoint. Example for PR: {"title": "My PR", "source": {"branch": {"name": "feature"}}}
path *stringThe Bitbucket API endpoint path (without base URL). Must start with "/". Examples: "/workspaces", "/repositories/{workspace}/{repo_slug}", "/repositories/{workspace}/{repo_slug}/pullrequests/{id}"
jqstringJMESPath expression to filter/transform the response. IMPORTANT: Always use this to extract only needed fields and reduce token costs. Examples: "values[*].{name: name, slug: slug}" (extract specific…
outputFormatstringOutput format: "toon" (default, 30-60% fewer tokens) or "json". TOON is optimized for LLMs with tabular arrays and minimal syntax.
queryParamsobjectOptional query parameters as key-value pairs. Examples: {"pagelen": "25", "page": "2", "q": "state=\"OPEN\"", "fields": "values.title,values.state"}

bb_put Bitbucket PUT Request

Replace Bitbucket resources (full update). Returns TOON format by default. **IMPORTANT - Cost Optimization:** - Use `jq` param to extract only needed fields from response - Example: `jq: "{uuid: uuid, name: name}"` **Output format:** TOON (default) or JSON (`outputFormat: "json"`) **Common operations:** 1. **Update repository:** `/repositories/{workspace}/{repo}` body: `{"description": "...", "is_private": true, "has_issues": true}` 2. **Create/update file:** `/repositories/{workspace}/{repo}/src` Note: Use multipart form data for file uploads (complex - prefer PATCH for metadata)…

ParameterTypeDescription
body *objectRequest body as a JSON object. Structure depends on the endpoint. Example for PR: {"title": "My PR", "source": {"branch": {"name": "feature"}}}
path *stringThe Bitbucket API endpoint path (without base URL). Must start with "/". Examples: "/workspaces", "/repositories/{workspace}/{repo_slug}", "/repositories/{workspace}/{repo_slug}/pullrequests/{id}"
jqstringJMESPath expression to filter/transform the response. IMPORTANT: Always use this to extract only needed fields and reduce token costs. Examples: "values[*].{name: name, slug: slug}" (extract specific…
outputFormatstringOutput format: "toon" (default, 30-60% fewer tokens) or "json". TOON is optimized for LLMs with tabular arrays and minimal syntax.
queryParamsobjectOptional query parameters as key-value pairs. Examples: {"pagelen": "25", "page": "2", "q": "state=\"OPEN\"", "fields": "values.title,values.state"}

bb_patch Bitbucket PATCH Request

Partially update Bitbucket resources. Returns TOON format by default. **IMPORTANT - Cost Optimization:** Use `jq` param to filter response fields. **Output format:** TOON (default) or JSON (`outputFormat: "json"`) **Common operations:** 1. **Update PR title/description:** `/repositories/{workspace}/{repo}/pullrequests/{id}` body: `{"title": "New title", "description": "Updated description"}` 2. **Update PR reviewers:** `/repositories/{workspace}/{repo}/pullrequests/{id}` body: `{"reviewers": [{"uuid": "{user-uuid}"}]}` 3. **Update repository properties:** `/repositories/{workspace}…

ParameterTypeDescription
body *objectRequest body as a JSON object. Structure depends on the endpoint. Example for PR: {"title": "My PR", "source": {"branch": {"name": "feature"}}}
path *stringThe Bitbucket API endpoint path (without base URL). Must start with "/". Examples: "/workspaces", "/repositories/{workspace}/{repo_slug}", "/repositories/{workspace}/{repo_slug}/pullrequests/{id}"
jqstringJMESPath expression to filter/transform the response. IMPORTANT: Always use this to extract only needed fields and reduce token costs. Examples: "values[*].{name: name, slug: slug}" (extract specific…
outputFormatstringOutput format: "toon" (default, 30-60% fewer tokens) or "json". TOON is optimized for LLMs with tabular arrays and minimal syntax.
queryParamsobjectOptional query parameters as key-value pairs. Examples: {"pagelen": "25", "page": "2", "q": "state=\"OPEN\"", "fields": "values.title,values.state"}

bb_delete Bitbucket DELETE Request

Delete Bitbucket resources. Returns TOON format by default. **Output format:** TOON (default) or JSON (`outputFormat: "json"`) **Common operations:** 1. **Delete branch:** `/repositories/{workspace}/{repo}/refs/branches/{branch_name}` 2. **Delete PR comment:** `/repositories/{workspace}/{repo}/pullrequests/{pr_id}/comments/{comment_id}` 3. **Decline PR:** `/repositories/{workspace}/{repo}/pullrequests/{id}/decline` 4. **Remove PR approval:** `/repositories/{workspace}/{repo}/pullrequests/{id}/approve` 5. **Delete repository:** `/repositories/{workspace}/{repo}` (caution: irreversible) Note…

ParameterTypeDescription
path *stringThe Bitbucket API endpoint path (without base URL). Must start with "/". Examples: "/workspaces", "/repositories/{workspace}/{repo_slug}", "/repositories/{workspace}/{repo_slug}/pullrequests/{id}"
jqstringJMESPath expression to filter/transform the response. IMPORTANT: Always use this to extract only needed fields and reduce token costs. Examples: "values[*].{name: name, slug: slug}" (extract specific…
outputFormatstringOutput format: "toon" (default, 30-60% fewer tokens) or "json". TOON is optimized for LLMs with tabular arrays and minimal syntax.
queryParamsobjectOptional query parameters as key-value pairs. Examples: {"pagelen": "25", "page": "2", "q": "state=\"OPEN\"", "fields": "values.title,values.state"}

bb_clone Clone Bitbucket Repository

Clone a Bitbucket repository to your local filesystem using SSH (preferred) or HTTPS. Provide `repoSlug` and `targetPath` (absolute path). Clones into `targetPath/repoSlug`. SSH keys must be configured; falls back to HTTPS if unavailable.

ParameterTypeDescription
repoSlug *stringRepository name/slug to clone. This is the short name of the repository. Example: "project-api"
targetPath *stringDirectory path where the repository will be cloned. IMPORTANT: Absolute paths are strongly recommended (e.g., "/home/user/projects" or "C:\Users\name\projects"). Relative paths will be resolved relati…
workspaceSlugstringBitbucket workspace slug containing the repository. If not provided, the tool will use your default workspace (either configured via BITBUCKET_DEFAULT_WORKSPACE or the first workspace in your account)…