Basic information
About Bitbucket MCP Server
Easily enable Bitbucket and Jira integration with REST APIs for seamless repository management, pull requests, and workspaces.
Bitbucket is a MCP server in the Developer Tools category listed in the AddMCP.net directory, published by aashari. It exposes 6 tools, including bb_get, bb_post, bb_put, bb_patch and more. Supported transport: stdio. Runtime: TypeScript. License: ISC. The repository has 157 GitHub stars. Source code is hosted on github.com. Related topics: ai, ai-connector, ai-integration, anthropic, atlassian.
Setup
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": [
"-y",
"@aashari/mcp-server-atlassian-bitbucket"
]
}
}
}
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": [
"-y",
"@aashari/mcp-server-atlassian-bitbucket"
]
}
}
}
{
"servers": {
"bitbucket": {
"command": "npx",
"args": [
"-y",
"@aashari/mcp-server-atlassian-bitbucket"
]
}
}
}
Bitbucket MCP Server — by aashari config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": [
"-y",
"@aashari/mcp-server-atlassian-bitbucket"
]
}
}
}
Bitbucket MCP Server — by aashari tools
- bb_get — 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: "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/
- bb_post — 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/{workspace}/{repo}/pullrequests/{id}/comments` body: `{"content": {"raw": "Comment text"}}` 3. **Approve PR:** `/repositories/{workspace}/{repo}/pullrequests/{id}/approve` body: `{}` 4. **Request changes:** `/repositories/{workspace}/{repo}/pullrequests/{id}/request-changes` body: `{}` 5. **Merge PR:** `/repositories/{workspace}/{repo}/pullrequests/{id}/merge` body: `{"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/
- bb_put — 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) 3. **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/
- bb_patch — 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}/{repo}` body: `{"description": "New description"}` 4. **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/
- bb_delete — 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: 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/
- bb_clone — 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.
Overview
What is Bitbucket?
Atlassian Bitbucket MCP Server connects AI assistants like Claude and Cursor AI directly to Bitbucket Cloud repositories, pull requests, and code. It allows developers, team leads, and DevOps engineers to interact with Bitbucket using natural language for code reviews, repository management, and workflow automation.
How to use Bitbucket?
Configure your MCP-compatible AI assistant to run npx -y @aashari/mcp-server-atlassian-bitbucket with environment variables for authentication. For Claude Desktop, add the server configuration to ~/.claude/claude_desktop_config.json. Set credentials via ATLASSIAN_USER_EMAIL plus ATLASSIAN_API_TOKEN (recommended) or ATLASSIAN_BITBUCKET_USERNAME plus ATLASSIAN_BITBUCKET_APP_PASSWORD. Optionally set BITBUCKET_DEFAULT_WORKSPACE in a config file at ~/.mcp/configs.json.
Key features of Bitbucket
- Provides 6 generic tools (
bb_get,bb_post,bb_put,bb_patch,bb_delete,bb_clone) for Bitbucket API access - Supports TOON output format reducing token consumption by 30-60% vs JSON
- Includes JMESPath (
jq) filtering to extract specific data and reduce costs - Supports branching, commits, pull requests, diffs, comments, approvals, and merges
- Offers scoped API token (future-proof) and legacy app password authentication methods
- Works with any MCP-compatible client including Claude Desktop, Cursor AI, Continue.dev, and Cline
Use cases of Bitbucket
- Ask AI about latest commits, open pull requests, or repository details in natural language
- Automate code reviews by having AI analyze PR diffs and add comments
- Manage pull requests—create, approve, merge, decline, or request changes via conversation
- Generate quick insights into project status, branch activity, and deployment pipelines
Frequently asked questions
1 What are the runtime requirements?
Node.js 18.0.0 or higher and a Bitbucket Cloud account (not Bitbucket Server/Data Center).
2 How do I authenticate?
Use a scoped API token (recommended, future-proof) or an App Password (legacy, deprecated by June 2026). For tokens, set ATLASSIAN_USER_EMAIL and ATLASSIAN_API_TOKEN. For app passwords, set ATLASSIAN_BITBUCKET_USERNAME and ATLASSIAN_BITBUCKET_APP_PASSWORD.
3 What APIs and endpoints are available?
All Bitbucket Cloud REST API 2.0 endpoints are accessible. Common paths include workspaces, repositories, branches, commits, pull requests, diffs, comments, approvals, merges, issues, pipelines, and deployments.
4 How is this different from alternatives?
Generic tools give access to any Bitbucket API endpoint without being locked to predefined actions. TOON output format and JMESPath filtering reduce token costs significantly compared to raw JSON responses.
5 Does the server support local cloning?
Yes, the bb_clone tool allows cloning a repository locally by specifying workspaceSlug, repoSlug, and targetPath.
Videos
Tutorials, guides, and showcases related to Bitbucket MCP Server — by aashari. The player loads when you press play.
Videos belong to their creators. Relevance is approximate; check the channel and description before following setup steps.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In