📇 ☁️ - Atlassian Bitbucket Cloud: work with repositories, pull requests, workspaces and code
Connect AI to Your Bitbucket Repositories
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
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"
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:
1. Go to Atlassian API Tokens
2. Click **"Create API token with scopes"**
3. Select **"Bitbucket"** as the product
4. Choose the appropriate scopes:
- **For read-only access**: repository, workspace
- **For full functionality**: repository, workspace, pullrequest
5. Copy the generated token (starts with ATATT)
6. Use with your Atlassian email as the username
Option B: App Password (Legacy - Will be deprecated)
Generate a Bitbucket App Password (legacy method):
1. Go to Bitbucket App Passwords
2. Click "Create app password"
3. Give it a name like "AI Assistant"
4. 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
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)**
**Option 2: Legacy App Password (will be deprecated June 2026)**
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:**
Then 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)**
**Option 2: Legacy App Password (will be deprecated June 2026)**
**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 |
|------|-------------|------------|
| bb_get | GET any Bitbucket API endpoint (read data) | path, queryParams?, jq?, outputFormat? |
| bb_post | POST to any endpoint (create resources) | path, body, queryParams?, jq?, outputFormat? |
| bb_put | PUT to any endpoint (replace resources) | path, body, queryParams?, jq?, outputFormat? |
| bb_patch | PATCH any endpoint (partial updates) | path, body, queryParams?, jq?, outputFormat? |