Bitbucket
Git repositories and pipelines by Atlassian.
Verdict
Common use cases
- Draft pull requests from Slack threads
- Log bugs as issues during customer calls
- Create feature branches from commit hashes
- Triage issue backlogs with team comments
- Spin up new repos for prototypes
Integration
- Vendor
- Bitbucket
- Category
- developer-tools
- Auth
- OAUTH2
- Tools
- 17
- Composio slug
bitbucket
Tools
- Create a branch
Creates a new branch in a bitbucket repository from a target commit hash; the branch name must be unique, adhere to bitbucket's naming conventions, and not include the 'refs/heads/' prefix.
- Create an issue
Creates a new issue in a bitbucket repository, setting the authenticated user as reporter; ensures assignee (if provided) has repository access, and that any specified milestone, version, or component ids exist.
- Create an issue comment
Adds a new comment with markdown support to an existing bitbucket issue.
- Create a pull request
Creates a new pull request in a specified bitbucket repository, ensuring the source branch exists and is distinct from the (optional) destination branch.
- Create repository
Creates a new bitbucket 'git' repository in a specified workspace, defaulting to the workspace's oldest project if `project key` is not provided.
- Create snippet comment
Posts a new top-level comment or a threaded reply to an existing comment on a specified bitbucket snippet.
- Delete issuedestructive
Permanently deletes a specific issue, identified by its `issue id`, from the repository specified by `repo slug` within the given `workspace`.
- Delete repositorydestructive
Permanently deletes a specified bitbucket repository; this action is irreversible and does not affect forks.
- Get current user
Retrieves the profile information (uuid, display name, links, creation date) for the currently authenticated bitbucket user.
- Get file from repository
Retrieves a specific file's content from a bitbucket repository at a given commit (hash, branch, or tag), failing if the file path is invalid for that commit.
- Get Pull Request
Get a single pull request by id with complete details.
- Get snippet
Retrieves a specific bitbucket snippet by its encoded id from an existing workspace, returning its metadata and file structure.
- List pull requests
Lists pull requests in a specified, accessible bitbucket repository, optionally filtering by state (open, merged, declined).
- List repositories in workspace
Lists repositories in a specified bitbucket workspace, accessible to the authenticated user, with options to filter by role or query string, and sort results.
- List workspace members
Lists all members of a specified bitbucket workspace; the workspace must exist.
- List workspaces
Lists bitbucket workspaces accessible to the authenticated user, optionally filtered and sorted.
- Update an issue
Updates an existing issue in a bitbucket repository by modifying specified attributes; requires `workspace`, `repo slug`, `issue id`, and at least one attribute to update.
Setup
Setup guide
- 11. Open your Switchy workspace settings and navigate to the Integrations tab. 2. Find Bitbucket in the MCP directory and click Connect. 3. You'll be redirected to Bitbucket's OAuth consent screen — sign in with an account that has write or admin access to the repositories your team needs. 4. Grant the requested scopes: repository read/write, issue read/write, pull request management, and snippet access. 5. After authorizing, Switchy redirects you back and confirms the connection succeeded. 6. Open any Space, type '@Bitbucket list repositories' and send — if you see your repos listed, the integration is live. 7. To invoke a tool, @mention Bitbucket in a message and describe the action in plain language, like '@Bitbucket create a branch called feature-auth from commit abc123 in myrepo'.
What teammates see: by default, memories from Bitbucket are scoped to the Space (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.
Works well with
Top models
Compatibility data appears once enough Spaces have used this MCP together with a given model.
How Switchy teams use it
Starter prompts
Open a PR
@Bitbucket create a pull request in our main repo from branch feature-login to main. Title it 'Add OAuth login flow' and use the last three messages as the description.Open in a Space →
Log a Bug
@Bitbucket create an issue in the support-tracker repo titled 'Search returns 500 on special characters'. Assign it to the backend team and mark it high priority.Open in a Space →
Branch from Commit
@Bitbucket create a branch called hotfix-payment-timeout from commit 7f3a9c2 in the payments repo.Open in a Space →
Comment on Issue
@Bitbucket add a comment to issue #42 in the api-gateway repo: 'Reproduced locally with Node 18.2. Stack trace attached in Slack thread above.'Open in a Space →
List Open PRs
@Bitbucket list all open pull requests in the frontend repo and summarize each one's title and author.Open in a Space →
Example outputs
Illustrative - representative of the model's voice and quality, not literal recordings.
@bitbucket list all open pull requests in the api-gateway repo that haven't been updated in the last 7 days
Found 4 open pull requests in workspace/api-gateway that haven't seen activity in 7+ days: 1. PR #127: "Refactor auth middleware" by @sarah (opened 12 days ago, last updated 9 days ago) 2. PR #119: "Add rate limiting headers" by @mike (opened 15 days ago, last updated 11 days ago) 3. PR #114: "Update OpenAPI spec" by @jordan (opened 22 days ago, last updated 14 days ago) 4. PR #108: "Fix CORS preflight handling" by @alex (opened 28 days ago, last updated 21 days ago) All four are awaiting review. PR #108 has merge conflicts that need resolution.
This read-heavy example demonstrates the MCP's ability to filter and surface stale PRs. Requires OAuth scope for repository read access. The actual response structure depends on your Bitbucket workspace configuration and PR metadata availability—this illustrative output shows what a typical summary might contain.
@bitbucket create a new branch called feature/user-preferences from the latest commit on main in the web-app repository
Successfully created branch `feature/user-preferences` in workspace/web-app. Branch details: - Source: main (commit hash: a3f7c2e) - Created at: 2025-06-15 14:32 UTC - Branch URL: https://bitbucket.org/workspace/web-app/branch/feature/user-preferences The branch is now available for checkout. Note that branch protection rules from the main branch do not automatically apply to this new feature branch.
This write example shows branch creation, a common workflow action. The MCP validates branch naming conventions and ensures the source commit exists before creating. Be aware this is a permanent repository change—the branch persists until explicitly deleted, and requires write access to the repository.
@bitbucket review all issues labeled 'bug' and 'high-priority' in the mobile-app repo, then draft a summary for our sprint planning meeting
Analyzed 7 high-priority bugs in workspace/mobile-app: **Critical (3):** Login crashes on iOS 16 (#342), payment flow timeout (#338), push notifications not delivered (#329). All three have reproducible steps and affect production users. **Important (4):** Profile image upload fails intermittently (#351), search results pagination broken (#347), offline mode sync issues (#340), deep link handling inconsistent (#335). **Recommended sprint focus:** Tackle the three critical issues first—they share a common thread around network error handling. Issues #342 and #338 were both reported within the last 48 hours and have active customer support tickets attached.
This synthesis example pairs Bitbucket's issue data with AI reasoning to prioritize work. The MCP fetches raw issue metadata (labels, descriptions, comments), and the AI analyzes patterns. Accuracy depends on how consistently your team uses labels and issue fields—inconsistent tagging will produce less useful summaries.
Use-case deep-dives
When Bitbucket MCP speeds up incident response workflows
A 6-person engineering team gets paged at 2am for a production bug. The on-call engineer needs to cut a hotfix branch from the last stable commit, open a PR, and loop in the right reviewers—all while half-asleep. The Bitbucket MCP handles this in one prompt: create branch from commit hash, open PR with the incident ticket linked, tag the team lead. The OAuth2 scope means the branch gets created under the engineer's identity, preserving audit trails. This works best when your team already lives in Bitbucket and has fewer than 10 active repos—beyond that, you're fighting the MCP's lack of workspace-wide search. If your incident playbook is more than three steps, script it once and let the MCP execute it every time you're paged.
Why Bitbucket MCP falls short for support-driven bug tracking
A 12-person SaaS company routes customer bug reports into Bitbucket Issues, hoping support reps can create and comment on issues without touching Git. The Bitbucket MCP technically supports this—create issue, add comment, assign to engineering—but the 17-tool surface area is overkill for non-technical users, and OAuth2 means every support rep needs a Bitbucket seat. The MCP shines when engineers are the ones triaging, not support. If your support team outnumbers your devs, you want a lighter integration (Jira, Linear) that doesn't require repository access. The threshold: if more than half your issue creators never touch code, this MCP adds friction instead of removing it. Stick with Bitbucket MCP when engineers own the full loop from report to merge.
When Bitbucket snippets beat Slack for async code discussion
A distributed 8-person team does code reviews across three time zones. Instead of pasting code blocks into Slack threads that scroll away, they use Bitbucket snippets as the single source of truth for design debates. The Bitbucket MCP makes this seamless: an engineer asks the AI to create a snippet from a local file, post it with context, and notify the relevant reviewers via snippet comments. The threading keeps discussion attached to the code, and OAuth2 ensures proper attribution when someone updates the snippet after feedback. This beats Slack when the conversation spans more than 48 hours or involves more than 10 back-and-forth messages. If your team already uses Bitbucket for repos, adding snippet-based review cuts down on context-switching and keeps decisions searchable long-term.
Frequently asked
What can the Bitbucket MCP do in Switchy?
The Bitbucket MCP lets your AI agents create branches, open pull requests, manage issues, and post comments directly in your Bitbucket repositories. It covers the core Git workflow actions — branching from a commit hash, creating PRs with source/destination branches, adding issue comments with markdown — without leaving the Switchy workspace. It can also create and delete repositories, though deletion is permanent and irreversible.
What OAuth scopes does Bitbucket MCP request?
Bitbucket uses OAuth2, so you'll authorize Switchy through Bitbucket's standard consent screen. The MCP requests write access to repositories, issues, and pull requests, plus read access to workspaces and projects. You don't need Bitbucket admin rights to connect it, but the MCP can only act on repositories where your Bitbucket account has write permissions. Check your workspace role before connecting.
Can the Bitbucket MCP merge pull requests or approve code reviews?
No. The MCP can create pull requests and add comments, but it doesn't merge PRs or submit approvals. Those actions require human review in Bitbucket's UI or a separate automation tool. If your team needs automated merges based on CI status, use Bitbucket Pipelines or a GitHub Action equivalent — the MCP is for authoring and discussion, not deployment gates.
How is this different from using Bitbucket's REST API directly?
The MCP wraps Bitbucket's API in natural-language tools, so your AI agents can create branches or issues by describing intent instead of crafting JSON payloads. You skip the boilerplate of managing tokens, pagination, and error codes. If you already have custom scripts calling Bitbucket's API, the MCP won't replace them — it's for ad-hoc agent tasks, not scheduled jobs.
Who on my team should connect the Bitbucket MCP?
Anyone with write access to the repositories you want agents to touch. The MCP inherits that user's Bitbucket permissions, so if they can't create branches in a repo, neither can the agent. For shared team use, connect it under a service account or a lead developer's credentials. Each connection counts as one active integration in your Switchy plan.