
Atlassian Bitbucket
STDIOBitbucket MCP server for secure repository interaction with AI systems
Bitbucket MCP server for secure repository interaction with AI systems
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.
✅ 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"
Get up and running in 2 minutes:
⚠️ IMPORTANT: Bitbucket App Passwords are being deprecated and will be removed by June 2026. We recommend using Scoped API Tokens for new setups.
Bitbucket is deprecating app passwords. Use the new scoped API tokens instead:
repository
, workspace
repository
, workspace
, pullrequest
ATATT
)Generate a Bitbucket App Password (legacy method):
# Set your credentials (choose one method) # Method 1: Scoped API Token (recommended - future-proof) export ATLASSIAN_USER_EMAIL="[email protected]" 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 ls-workspaces # List repositories in your workspace npx -y @aashari/mcp-server-atlassian-bitbucket ls-repos --workspace-slug your-workspace # Get details about a specific repository npx -y @aashari/mcp-server-atlassian-bitbucket get-repo --workspace-slug your-workspace --repo-slug your-repo
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": "[email protected]", "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 "🔗 bitbucket" in the status bar.
Most AI assistants support MCP. Install the server globally:
npm install -g @aashari/mcp-server-atlassian-bitbucket
Then configure your AI assistant to use the MCP server with STDIO transport.
Create ~/.mcp/configs.json
for system-wide configuration:
Option 1: Scoped API Token (recommended - future-proof)
{ "bitbucket": { "environments": { "ATLASSIAN_USER_EMAIL": "[email protected]", "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"
.
Ask your AI assistant:
Ask your AI assistant:
Ask your AI assistant:
Ask your AI assistant:
Choose the right authentication method:
For Bitbucket App Passwords (if using Option 2):
For Scoped API Tokens (recommended):
~/.mcp/configs.json
file to use the new scoped API token format:{ "@aashari/mcp-server-atlassian-bitbucket": { "environments": { "ATLASSIAN_USER_EMAIL": "[email protected]", "ATLASSIAN_API_TOKEN": "ATATT3xFfGF0..." } } }
Verify your credentials:
# Test your credentials work npx -y @aashari/mcp-server-atlassian-bitbucket ls-workspaces
Check your workspace slug:
# List your workspaces to see the correct slugs npx -y @aashari/mcp-server-atlassian-bitbucket ls-workspaces
Use the exact slug from Bitbucket URL:
https://bitbucket.org/myteam/my-repo
myteam
my-repo
Set a default workspace to avoid specifying it every time:
export BITBUCKET_DEFAULT_WORKSPACE="your-main-workspace-slug"
~/.claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
If you're still having issues:
For Scoped API Tokens (recommended):
repository
, workspace
(add pullrequest
for PR management)For Bitbucket App Passwords (legacy - being deprecated):
Yes! This works with both public and private repositories. You just need the appropriate permissions through your Bitbucket App Password.
No! Set BITBUCKET_DEFAULT_WORKSPACE
in your environment or config file, and it will be used automatically when you don't specify one.
Any AI assistant that supports the Model Context Protocol (MCP):
Yes! This tool:
Currently, each installation supports one set of credentials. For multiple accounts, you'd need separate configurations.
Need help? Here's how to get assistance:
Made with ❤️ for developers who want to bring AI into their Bitbucket workflow.