Atlassian Bitbucket MCP Server
The Atlassian Bitbucket MCP Server enables AI systems to securely interact with Bitbucket Cloud repositories, pull requests, workspaces, and code in real time.
With this server, you can:
Access and manage workspaces: List, filter, and retrieve workspace information
Explore repositories: Search, list, and get repository metadata
Manage pull requests: List, filter, create, and comment on PRs
Search and access code: Perform advanced searches, retrieve file content
Work with branches: Create branches, list them, and view diffs
Track commits: Access commit history and compare changes
Clone repositories: Download repositories locally for development
The server operates locally with your credentials (no remote token storage) and provides Markdown-formatted responses for seamless AI system integration.
Provides authentication and integration with Atlassian services, specifically focused on Bitbucket functionality using Atlassian API tokens.
Allows AI assistants to interact with Bitbucket repositories, including listing repositories, accessing pull requests, viewing commit information, and exploring workspaces.
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., "@Atlassian Bitbucket MCP Server show me all open pull requests that need review"
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.
Connect AI to Your Bitbucket Repositories
Transform how you work with Bitbucket by connecting Claude, Cursor AI, and other AI assistants directly to your repositories, pull requests, and code. Get instant insights, automate code reviews, and streamline your development workflow.
What You Can Do
Ask AI about your code: "What's the latest commit in my main repository?"
Get PR insights: "Show me all open pull requests that need review"
Search your codebase: "Find all JavaScript files that use the authentication function"
Review code changes: "Compare the differences between my feature branch and main"
Manage pull requests: "Create a PR for my new-feature branch"
Automate workflows: "Add a comment to PR #123 with the test results"
Related MCP server: Bitbucket Cloud MCP Server
Perfect For
Developers who want AI assistance with code reviews and repository management
Team Leads needing quick insights into project status and pull request activity
DevOps Engineers automating repository workflows and branch management
Anyone who wants to interact with Bitbucket using natural language
Requirements
Node.js 18.0.0 or higher
Bitbucket Cloud account (not Bitbucket Server/Data Center)
Authentication credentials: Scoped API Token (recommended) or App Password (legacy)
Quick Start
Get up and running in 2 minutes:
1. Get Your Bitbucket Credentials
IMPORTANT: Bitbucket App Passwords are being deprecated and will be removed by June 2026. We recommend using Scoped API Tokens for new setups.
Option A: Scoped API Token (Recommended - Future-Proof)
Bitbucket is deprecating app passwords. Use the new scoped API tokens instead:
Go to Atlassian API Tokens
Click "Create API token with scopes"
Select "Bitbucket" as the product
Choose the appropriate scopes:
For read-only access:
repository,workspaceFor full functionality:
repository,workspace,pullrequest
Copy the generated token (starts with
ATATT)Use with your Atlassian email as the username
Option B: App Password (Legacy - Will be deprecated)
Generate a Bitbucket App Password (legacy method):
Go to Bitbucket App Passwords
Click "Create app password"
Give it a name like "AI Assistant"
Select these permissions:
Workspaces: Read
Repositories: Read (and Write if you want AI to create PRs/comments)
Pull Requests: Read (and Write for PR management)
2. Try It Instantly
# Set your credentials (choose one method)
# Method 1: Scoped API Token (recommended - future-proof)
export ATLASSIAN_USER_EMAIL="your.email@company.com"
export ATLASSIAN_API_TOKEN="your_scoped_api_token" # Token starting with ATATT
# OR Method 2: Legacy App Password (will be deprecated June 2026)
export ATLASSIAN_BITBUCKET_USERNAME="your_username"
export ATLASSIAN_BITBUCKET_APP_PASSWORD="your_app_password"
# List your workspaces
npx -y @aashari/mcp-server-atlassian-bitbucket get --path "/workspaces"
# List repositories in a workspace
npx -y @aashari/mcp-server-atlassian-bitbucket get --path "/repositories/your-workspace"
# Get pull requests for a repository
npx -y @aashari/mcp-server-atlassian-bitbucket get --path "/repositories/your-workspace/your-repo/pullrequests"
# Get repository details with JMESPath filtering
npx -y @aashari/mcp-server-atlassian-bitbucket get --path "/repositories/your-workspace/your-repo" --jq "{name: name, language: language}"Connect to AI Assistants
For Claude Desktop Users
Add this to your Claude configuration file (~/.claude/claude_desktop_config.json):
Option 1: Scoped API Token (recommended - future-proof)
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": ["-y", "@aashari/mcp-server-atlassian-bitbucket"],
"env": {
"ATLASSIAN_USER_EMAIL": "your.email@company.com",
"ATLASSIAN_API_TOKEN": "your_scoped_api_token"
}
}
}
}Option 2: Legacy App Password (will be deprecated June 2026)
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": ["-y", "@aashari/mcp-server-atlassian-bitbucket"],
"env": {
"ATLASSIAN_BITBUCKET_USERNAME": "your_username",
"ATLASSIAN_BITBUCKET_APP_PASSWORD": "your_app_password"
}
}
}
}Restart Claude Desktop, and you'll see the bitbucket server in the status bar.
For Other AI Assistants
Most AI assistants support MCP. You can either:
Option 1: Use npx (recommended - always latest version):
Configure your AI assistant to run: npx -y @aashari/mcp-server-atlassian-bitbucket
Option 2: Install globally:
npm install -g @aashari/mcp-server-atlassian-bitbucketThen configure your AI assistant to use the MCP server with STDIO transport.
Supported AI assistants:
Claude Desktop (official support)
Cursor AI
Continue.dev
Cline
Any MCP-compatible client
Alternative: Configuration File
Create ~/.mcp/configs.json for system-wide configuration:
Option 1: Scoped API Token (recommended - future-proof)
{
"bitbucket": {
"environments": {
"ATLASSIAN_USER_EMAIL": "your.email@company.com",
"ATLASSIAN_API_TOKEN": "your_scoped_api_token",
"BITBUCKET_DEFAULT_WORKSPACE": "your_main_workspace"
}
}
}Option 2: Legacy App Password (will be deprecated June 2026)
{
"bitbucket": {
"environments": {
"ATLASSIAN_BITBUCKET_USERNAME": "your_username",
"ATLASSIAN_BITBUCKET_APP_PASSWORD": "your_app_password",
"BITBUCKET_DEFAULT_WORKSPACE": "your_main_workspace"
}
}
}Alternative config keys: The system also accepts "atlassian-bitbucket", "@aashari/mcp-server-atlassian-bitbucket", or "mcp-server-atlassian-bitbucket" instead of "bitbucket".
Available Tools
This MCP server provides 6 generic tools that can access any Bitbucket API endpoint:
Tool | Description | Parameters |
| GET any Bitbucket API endpoint (read data) |
|
| POST to any endpoint (create resources) |
|
| PUT to any endpoint (replace resources) |
|
| PATCH any endpoint (partial updates) |
|
| DELETE any endpoint (remove resources) |
|
| Clone a repository locally |
|
Tool Parameters
All API tools support these common parameters:
path(required): API endpoint path starting with/(the/2.0prefix is added automatically)queryParams(optional): Key-value pairs for query parameters (e.g.,{"pagelen": "25", "page": "2"})jq(optional): JMESPath expression to filter/transform the response - highly recommended to reduce token costsoutputFormat(optional):"toon"(default, 30-60% fewer tokens) or"json"body(required for POST/PUT/PATCH): Request body as JSON object
Common API Paths
All paths automatically have /2.0 prepended. Full Bitbucket Cloud REST API 2.0 reference: https://developer.atlassian.com/cloud/bitbucket/rest/
Workspaces & Repositories:
/workspaces- List all workspaces/repositories/{workspace}- List repos in workspace/repositories/{workspace}/{repo}- Get repo details/repositories/{workspace}/{repo}/refs/branches- List branches/repositories/{workspace}/{repo}/refs/branches/{branch_name}- Get/delete branch/repositories/{workspace}/{repo}/commits- List commits/repositories/{workspace}/{repo}/commits/{commit}- Get commit details/repositories/{workspace}/{repo}/src/{commit}/{filepath}- Get file content
Pull Requests:
/repositories/{workspace}/{repo}/pullrequests- List PRs (GET) or create PR (POST)/repositories/{workspace}/{repo}/pullrequests/{id}- Get/update/delete PR/repositories/{workspace}/{repo}/pullrequests/{id}/diff- Get PR diff/repositories/{workspace}/{repo}/pullrequests/{id}/comments- List/add PR comments/repositories/{workspace}/{repo}/pullrequests/{id}/approve- Approve PR (POST) or remove approval (DELETE)/repositories/{workspace}/{repo}/pullrequests/{id}/request-changes- Request changes (POST)/repositories/{workspace}/{repo}/pullrequests/{id}/merge- Merge PR (POST)/repositories/{workspace}/{repo}/pullrequests/{id}/decline- Decline PR (POST)
Comparisons:
/repositories/{workspace}/{repo}/diff/{source}..{destination}- Compare branches/commits
Other Resources:
/repositories/{workspace}/{repo}/issues- List/manage issues/repositories/{workspace}/{repo}/downloads- List/manage downloads/repositories/{workspace}/{repo}/pipelines- Access Bitbucket Pipelines/repositories/{workspace}/{repo}/deployments- View deployments
TOON Output Format
What is TOON? Token-Oriented Object Notation is a format optimized for LLMs that reduces token consumption by 30-60% compared to JSON. It uses tabular arrays and minimal syntax while preserving all data.
Default behavior: All tools return TOON format by default. You can override this with outputFormat: "json" if needed.
Example comparison:
JSON (verbose):
{
"values": [
{"name": "repo1", "slug": "repo-1"},
{"name": "repo2", "slug": "repo-2"}
]
}
TOON (efficient):
values:
name | slug
repo1 | repo-1
repo2 | repo-2Learn more: https://github.com/toon-format/toon
JMESPath Filtering
All tools support optional JMESPath (jq) filtering to extract specific data and reduce token costs further:
Important: Always use jq to filter responses! Unfiltered API responses can be very large and expensive in terms of tokens.
# Get just repository names
npx -y @aashari/mcp-server-atlassian-bitbucket get \
--path "/repositories/myworkspace" \
--jq "values[].name"
# Get PR titles and states (custom object shape)
npx -y @aashari/mcp-server-atlassian-bitbucket get \
--path "/repositories/myworkspace/myrepo/pullrequests" \
--jq "values[].{title: title, state: state, author: author.display_name}"
# Get first result only
npx -y @aashari/mcp-server-atlassian-bitbucket get \
--path "/repositories/myworkspace" \
--jq "values[0]"
# Explore schema with one item first, then filter
npx -y @aashari/mcp-server-atlassian-bitbucket get \
--path "/workspaces" \
--query-params '{"pagelen": "1"}'Common JMESPath patterns:
values[*].fieldName- Extract single field from all itemsvalues[*].{key1: field1, key2: field2}- Create custom object shapevalues[0]- Get first item onlyvalues[:5]- Get first 5 itemsvalues[?state=='OPEN']- Filter by condition
Full JMESPath reference: https://jmespath.org
Real-World Examples
Explore Your Repositories
Ask your AI assistant:
"List all repositories in my main workspace"
"Show me details about the backend-api repository"
"What's the commit history for the feature-auth branch?"
"Get the content of src/config.js from the main branch"
Manage Pull Requests
Ask your AI assistant:
"Show me all open pull requests that need review"
"Get details about pull request #42 including the code changes"
"Create a pull request from feature-login to main branch"
"Add a comment to PR #15 saying the tests passed"
"Approve pull request #33"
Work with Branches and Code
Ask your AI assistant:
"Compare my feature branch with the main branch"
"List all branches in the user-service repository"
"Show me the differences between commits abc123 and def456"
Advanced Usage
Cost Optimization Tips
Always use JMESPath filtering - Extract only needed fields to minimize token usage
Use pagination wisely - Set
pagelenquery parameter to limit results (e.g.,{"pagelen": "10"})Explore schema first - Fetch one item without filters to see available fields, then filter subsequent calls
Leverage TOON format - Default TOON format saves 30-60% tokens vs JSON
Query parameters for filtering - Use Bitbucket's
qparameter for server-side filtering before results are returned
Query Parameter Examples
# Filter PRs by state
npx -y @aashari/mcp-server-atlassian-bitbucket get \
--path "/repositories/workspace/repo/pullrequests" \
--query-params '{"state": "OPEN", "pagelen": "5"}' \
--jq "values[*].{id: id, title: title}"
# Search PRs by title
npx -y @aashari/mcp-server-atlassian-bitbucket get \
--path "/repositories/workspace/repo/pullrequests" \
--query-params '{"q": "title~\"bug\""}' \
--jq "values[*].{id: id, title: title}"
# Filter repositories by role
npx -y @aashari/mcp-server-atlassian-bitbucket get \
--path "/repositories/workspace" \
--query-params '{"role": "owner", "pagelen": "10"}'
# Sort by updated date
npx -y @aashari/mcp-server-atlassian-bitbucket get \
--path "/repositories/workspace/repo/pullrequests" \
--query-params '{"sort": "-updated_on"}' \
--jq "values[*].{id: id, title: title, updated: updated_on}"Working with Large Responses
When dealing with APIs that return large payloads:
Use sparse fieldsets - Add
fieldsquery parameter:{"fields": "values.name,values.slug"}Paginate results - Use
pagelenandpageparametersFilter at the source - Use Bitbucket's
qparameter for server-side filteringPost-process with JQ - Further filter the response with JMESPath
Example combining all techniques:
npx -y @aashari/mcp-server-atlassian-bitbucket get \
--path "/repositories/workspace/repo/pullrequests" \
--query-params '{"state": "OPEN", "pagelen": "10", "fields": "values.id,values.title,values.state"}' \
--jq "values[*].{id: id, title: title}"Best Practices for AI Interactions
Be specific with paths - Use exact workspace/repo slugs (case-sensitive)
Test with CLI first - Verify paths and authentication before using in AI context
Use descriptive JQ filters - Extract meaningful field names for better AI understanding
Enable DEBUG for troubleshooting - See exactly what's being sent to Bitbucket API
Check API limits - Bitbucket Cloud has rate limits; use filtering to reduce calls
CLI Commands
The CLI mirrors the MCP tools for direct terminal access. All commands return JSON output (not TOON - TOON is only for MCP mode).
Available Commands
# Get help
npx -y @aashari/mcp-server-atlassian-bitbucket --help
# GET request
npx -y @aashari/mcp-server-atlassian-bitbucket get \
--path "/workspaces" \
--jq "values[*].{name: name, slug: slug}"
# GET with query parameters
npx -y @aashari/mcp-server-atlassian-bitbucket get \
--path "/repositories/myworkspace/myrepo/pullrequests" \
--query-params '{"state": "OPEN", "pagelen": "10"}' \
--jq "values[*].{id: id, title: title}"
# POST request (create a PR)
npx -y @aashari/mcp-server-atlassian-bitbucket post \
--path "/repositories/myworkspace/myrepo/pullrequests" \
--body '{"title": "My PR", "source": {"branch": {"name": "feature"}}, "destination": {"branch": {"name": "main"}}}' \
--jq "{id: id, title: title}"
# POST with query parameters
npx -y @aashari/mcp-server-atlassian-bitbucket post \
--path "/repositories/myworkspace/myrepo/pullrequests/42/comments" \
--body '{"content": {"raw": "Looks good!"}}' \
--query-params '{"fields": "id,content"}' \
--jq "{id: id, content: content.raw}"
# PUT request (replace resource)
npx -y @aashari/mcp-server-atlassian-bitbucket put \
--path "/repositories/myworkspace/myrepo" \
--body '{"description": "Updated description", "is_private": true}'
# PATCH request (partial update)
npx -y @aashari/mcp-server-atlassian-bitbucket patch \
--path "/repositories/myworkspace/myrepo/pullrequests/123" \
--body '{"title": "Updated PR title"}'
# DELETE request
npx -y @aashari/mcp-server-atlassian-bitbucket delete \
--path "/repositories/myworkspace/myrepo/refs/branches/old-branch"
# Clone repository
npx -y @aashari/mcp-server-atlassian-bitbucket clone \
--workspace-slug myworkspace \
--repo-slug myrepo \
--target-path /absolute/path/to/parent/directoryCLI Options
For get and delete commands:
-p, --path <path>(required) - API endpoint path-q, --query-params <json>(optional) - Query parameters as JSON string--jq <expression>(optional) - JMESPath filter expression
For post, put, and patch commands:
-p, --path <path>(required) - API endpoint path-b, --body <json>(required) - Request body as JSON string-q, --query-params <json>(optional) - Query parameters as JSON string--jq <expression>(optional) - JMESPath filter expression
For clone command:
--workspace-slug <slug>(optional) - Workspace slug (uses default if not provided)--repo-slug <slug>(required) - Repository slug--target-path <path>(required) - Absolute path to parent directory where repo will be cloned
Debugging
Enable Debug Mode
Set the DEBUG environment variable to see detailed logging:
# For CLI testing
DEBUG=true npx -y @aashari/mcp-server-atlassian-bitbucket get --path "/workspaces"
# For Claude Desktop - add to config
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": ["-y", "@aashari/mcp-server-atlassian-bitbucket"],
"env": {
"DEBUG": "true",
"ATLASSIAN_USER_EMAIL": "...",
"ATLASSIAN_API_TOKEN": "..."
}
}
}
}Log files: When running in MCP mode, logs are written to ~/.mcp/data/@aashari-mcp-server-atlassian-bitbucket.[session-id].log
Test with HTTP Mode
For interactive debugging, run the server in HTTP mode and use the MCP Inspector:
# Set credentials first
export ATLASSIAN_USER_EMAIL="your.email@company.com"
export ATLASSIAN_API_TOKEN="your_token"
export DEBUG=true
# Start HTTP server with MCP Inspector
npx -y @aashari/mcp-server-atlassian-bitbucket
# Then in another terminal:
PORT=3000 npm run mcp:inspectThis opens a visual interface to test tools and see request/response data.
Common Issues
Server not appearing in Claude Desktop:
Check config file syntax (valid JSON)
Restart Claude Desktop completely
Check Claude Desktop logs:
~/Library/Logs/Claude/mcp*.log(macOS)
Tools not working:
Enable DEBUG mode to see detailed errors
Test with CLI first to isolate MCP vs credentials issues
Verify API paths are correct (case-sensitive)
Troubleshooting
"Authentication failed" or "403 Forbidden"
Choose the right authentication method:
Standard Atlassian method (recommended): Use your Atlassian account email + API token (works with any Atlassian service)
Bitbucket-specific method (legacy): Use your Bitbucket username + App password (Bitbucket only)
For Scoped API Tokens (recommended):
Go to Atlassian API Tokens
Make sure your token is still active and has the right scopes
Required scopes:
repository,workspace(addpullrequestfor PR management)Token should start with
ATATT
For Bitbucket App Passwords (legacy):
Go to Bitbucket App Passwords
Make sure your app password has the right permissions
Remember: App passwords will be deprecated by June 2026
Verify your credentials:
# Test credentials with CLI export ATLASSIAN_USER_EMAIL="your.email@company.com" export ATLASSIAN_API_TOKEN="your_token" npx -y @aashari/mcp-server-atlassian-bitbucket get --path "/workspaces"Environment variable naming:
Use
ATLASSIAN_USER_EMAIL+ATLASSIAN_API_TOKENfor scoped tokensUse
ATLASSIAN_BITBUCKET_USERNAME+ATLASSIAN_BITBUCKET_APP_PASSWORDfor app passwordsDon't use
ATLASSIAN_SITE_NAME- it's not needed for Bitbucket Cloud
"Resource not found" or "404"
Check the API path:
Paths are case-sensitive
Use workspace slug (from URL), not display name
Example: If your repo URL is
https://bitbucket.org/myteam/my-repo, usemyteamandmy-repo
Verify the resource exists:
# List workspaces to find the correct slug npx -y @aashari/mcp-server-atlassian-bitbucket get --path "/workspaces"
Claude Desktop Integration Issues
Restart Claude Desktop after updating the config file
Verify config file location:
macOS:
~/.claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Getting Help
If you're still having issues:
Run a simple test command to verify everything works
Check the GitHub Issues for similar problems
Create a new issue with your error message and setup details
Frequently Asked Questions
What permissions do I need?
For Scoped API Tokens (recommended):
Required scopes:
repository,workspaceAdd
pullrequestfor PR management
For Bitbucket App Passwords (legacy):
For read-only access: Workspaces: Read, Repositories: Read, Pull Requests: Read
For full functionality: Add "Write" permissions for Repositories and Pull Requests
Can I use this with private repositories?
Yes! This works with both public and private repositories. You just need the appropriate permissions through your credentials.
What AI assistants does this work with?
Any AI assistant that supports the Model Context Protocol (MCP):
Claude Desktop
Cursor AI
Continue.dev
Many others
Is my data secure?
Yes! This tool:
Runs entirely on your local machine
Uses your own Bitbucket credentials
Never sends your data to third parties
Only accesses what you give it permission to access
Migration from v1.x
Version 2.0 represents a major architectural change. If you're upgrading from v1.x:
Before (v1.x) - 20+ specific tools:
bb_ls_workspaces, bb_get_workspace, bb_ls_repos, bb_get_repo,
bb_list_branches, bb_add_branch, bb_get_commit_history, bb_get_file,
bb_ls_prs, bb_get_pr, bb_add_pr, bb_update_pr, bb_approve_pr, bb_reject_pr,
bb_ls_pr_comments, bb_add_pr_comment, bb_diff_branches, bb_diff_commits, bb_searchAfter (v2.0+) - 6 generic tools:
bb_get, bb_post, bb_put, bb_patch, bb_delete, bb_cloneMigration Examples
v1.x Tool | v2.0+ Equivalent |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Key Changes
All tools now require explicit paths - more verbose but more flexible
Use JMESPath filtering - extract only what you need to reduce tokens
TOON format by default - 30-60% fewer tokens (can override with
outputFormat: "json")Direct Bitbucket API access - any API endpoint works, no code changes needed for new features
Support
Need help? Here's how to get assistance:
Check the troubleshooting section above - most common issues are covered there
Visit our GitHub repository for documentation and examples: github.com/aashari/mcp-server-atlassian-bitbucket
Report issues at GitHub Issues
Start a discussion for feature requests or general questions
Made with care for developers who want to bring AI into their Bitbucket workflow.
Available Tools
6 toolsbb_cloneClone Bitbucket RepositoryA
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.
Inputs: repoSlug (required), targetPath (required), workspaceSlug.
bb_deleteBitbucket DELETE RequestADestructiveIdempotent
Delete Bitbucket resources. Returns TOON format by default.
Output format: TOON (default) or JSON (outputFormat: "json")
Common operations:
Delete branch:
/repositories/{workspace}/{repo}/refs/branches/{branch_name}Delete PR comment:
/repositories/{workspace}/{repo}/pullrequests/{pr_id}/comments/{comment_id}Decline PR:
/repositories/{workspace}/{repo}/pullrequests/{id}/declineRemove PR approval:
/repositories/{workspace}/{repo}/pullrequests/{id}/approveDelete repository:
/repositories/{workspace}/{repo}(caution: irreversible)
Note: Most DELETE endpoints return 204 No Content on success.
The /2.0 prefix is added automatically. API reference: https://developer.atlassian.com/cloud/bitbucket/rest/
Inputs: path (required), queryParams, jq, outputFormat.
bb_getBitbucket GET RequestARead-onlyIdempotent
Read any Bitbucket data. Returns TOON format by default (30-60% fewer tokens than JSON).
IMPORTANT - Cost Optimization:
ALWAYS use
jqparam to filter response fields. Unfiltered responses are very expensive!Use
pagelenquery 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:
First call:
path: "/workspaces", queryParams: {"pagelen": "1"}(no jq) - explore available fieldsThen use:
jq: "values[*].{slug: slug, name: name, uuid: uuid}"- extract only what you need
Output format: TOON (default, token-efficient) or JSON (outputFormat: "json")
Common paths:
/workspaces- list workspaces/repositories/{workspace}- list repos in workspace/repositories/{workspace}/{repo}- get repo details/repositories/{workspace}/{repo}/pullrequests- list PRs/repositories/{workspace}/{repo}/pullrequests/{id}- get PR details/repositories/{workspace}/{repo}/pullrequests/{id}/comments- list PR comments/repositories/{workspace}/{repo}/pullrequests/{id}/diff- get PR diff/repositories/{workspace}/{repo}/refs/branches- list branches/repositories/{workspace}/{repo}/commits- list commits/repositories/{workspace}/{repo}/src/{commit}/{filepath}- get file content/repositories/{workspace}/{repo}/diff/{source}..{destination}- compare branches/commits
Query params: pagelen (page size), page (page number), q (filter), sort (order), fields (sparse response)
Example filters (q param): state="OPEN", source.branch.name="feature", title~"bug"
JQ examples: values[*].slug, values[0], values[*].{name: name, uuid: uuid}
The /2.0 prefix is added automatically. API reference: https://developer.atlassian.com/cloud/bitbucket/rest/
Inputs: path (required), queryParams, jq, outputFormat.
bb_patchBitbucket PATCH RequestA
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:
Update PR title/description:
/repositories/{workspace}/{repo}/pullrequests/{id}body:{"title": "New title", "description": "Updated description"}Update PR reviewers:
/repositories/{workspace}/{repo}/pullrequests/{id}body:{"reviewers": [{"uuid": "{user-uuid}"}]}Update repository properties:
/repositories/{workspace}/{repo}body:{"description": "New description"}Update comment:
/repositories/{workspace}/{repo}/pullrequests/{pr_id}/comments/{comment_id}body:{"content": {"raw": "Updated comment"}}
The /2.0 prefix is added automatically. API reference: https://developer.atlassian.com/cloud/bitbucket/rest/
Inputs: path (required), body (required), queryParams, jq, +1 more.
bb_postBitbucket POST RequestA
Create Bitbucket resources. Returns TOON format by default (token-efficient).
IMPORTANT - Cost Optimization:
Use
jqparam 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:
Create PR:
/repositories/{workspace}/{repo}/pullrequestsbody:{"title": "...", "source": {"branch": {"name": "feature"}}, "destination": {"branch": {"name": "main"}}}Add PR comment:
/repositories/{workspace}/{repo}/pullrequests/{id}/commentsbody:{"content": {"raw": "Comment text"}}Approve PR:
/repositories/{workspace}/{repo}/pullrequests/{id}/approvebody:{}Request changes:
/repositories/{workspace}/{repo}/pullrequests/{id}/request-changesbody:{}Merge PR:
/repositories/{workspace}/{repo}/pullrequests/{id}/mergebody:{"merge_strategy": "squash"}(strategies: merge_commit, squash, fast_forward)
The /2.0 prefix is added automatically. API reference: https://developer.atlassian.com/cloud/bitbucket/rest/
Inputs: path (required), body (required), queryParams, jq, +1 more.
bb_putBitbucket PUT RequestAIdempotent
Replace Bitbucket resources (full update). Returns TOON format by default.
IMPORTANT - Cost Optimization:
Use
jqparam to extract only needed fields from responseExample:
jq: "{uuid: uuid, name: name}"
Output format: TOON (default) or JSON (outputFormat: "json")
Common operations:
Update repository:
/repositories/{workspace}/{repo}body:{"description": "...", "is_private": true, "has_issues": true}Create/update file:
/repositories/{workspace}/{repo}/srcNote: Use multipart form data for file uploads (complex - prefer PATCH for metadata)Update branch restriction:
/repositories/{workspace}/{repo}/branch-restrictions/{id}body:{"kind": "push", "pattern": "main", "users": [{"uuid": "..."}]}
The /2.0 prefix is added automatically. API reference: https://developer.atlassian.com/cloud/bitbucket/rest/
Inputs: path (required), body (required), queryParams, jq, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool corresponds to a distinct HTTP method (or clone operation) with clear purposes: clone for local cloning, delete for deletions, get for reads, patch for partial updates, post for creations, and put for full replacements. There is no overlap.
All tools follow a consistent 'bb_<verb>' pattern using HTTP method names (clone, delete, get, patch, post, put). The naming is predictable and uniform.
With 6 tools, the server provides a concise CRUD+L (clone) interface for Bitbucket. This is well-scoped for a MCP server; each tool has a clear role without unnecessary bloat.
The tools cover all standard CRUD operations plus cloning. However, specific workflows like merging or approving PRs are handled via generic post/put, which may require agents to construct endpoint paths. A dedicated tool for common composite operations could improve completeness slightly.
Maintenance
Related MCP Connectors
Connect your team's living knowledge base — docs, data, issues, CRM — to Claude and ChatGPT.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
One workspace of tools for Claude and ChatGPT: connect 600+ apps, generate media, build tools.
Related MCP Servers
- 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
- AlicenseBqualityDmaintenanceEnables AI assistants to read Bitbucket Cloud pull requests and diffs through natural conversation.223 npmMIT
- AlicenseAqualityDmaintenanceConnects Claude Desktop and Claude Code to Bitbucket Cloud, enabling searching PRs, commits, diffs, and file content for AI-assisted bug triage and impact analysis.841 npmISC
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Bitbucket Cloud and Server APIs to list and retrieve repositories, fetch and create pull requests, and manage related resources through natural language.6,532 npmMIT
Appeared in Searches
- A server for finding information about Bitbucket, the Git repository hosting service
- Guide to connecting to Bitbucket Data Center
- Bitbucket pull request reviewer information
- Bitbucket integration for CursorAI to manage repositories and pull requests
- Bitbucket integration for repository and pull request management