What it does
An MCP server that integrates Bitbucket Cloud and Server APIs with Claude and other AI assistants. It exposes tools to list and retrieve repositories, view pull request information, and query repository metadata. The server is designed with safety as a core principle—no destructive operations are supported, ensuring interactions remain read-only or read-write safe (such as posting comments) without risk of data loss.
Who it's for
Backend engineers and development teams using Bitbucket who want to integrate Bitbucket context into their AI-assisted workflows. This includes developers doing code review with AI assistance, DevOps engineers automating repository lookups, and teams that need to ground AI analysis in live Bitbucket data.
Common use cases
- Fetch pull request details and metadata from Claude Code while reviewing code
- Query repository information to provide AI assistants with accurate codebase context
- Retrieve existing comments and discussions on pull requests for informed AI responses
- Automate repository metadata lookups for CI/CD pipelines or security workflows
- Access Bitbucket data to ground threat analysis or compliance checks
Setup pitfalls
- Use a Bitbucket App Password (not your regular password); create one in Personal Settings > App Passwords with at least Repositories Read and Pull Requests Read permissions
- Provide either
BITBUCKET_TOKENor the pairBITBUCKET_USERNAMEandBITBUCKET_PASSWORD(username is typically your email address) BITBUCKET_URLformat matters: preferhttps://api.bitbucket.org/2.0over the legacy web format (workspace auto-extracts from the URL in legacy mode)- A secret was detected during scanning; store all credentials in protected environment variables or sandboxed execution contexts to prevent accidental exposure