bitbucket-mcp
Provides tools for managing Bitbucket repositories, pull requests, branches, commits, issues, and workspaces.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bitbucket-mcplist open pull requests in workspace 'myteam'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Bitbucket MCP Server
A comprehensive Model Context Protocol (MCP) server for Bitbucket integration, providing 27 tools to manage repositories, pull requests, branches, commits, issues, and workspaces.
Features
ποΈ Repository Management (4 tools)
get_repository - Get detailed repository information
list_repositories - List all repositories in a workspace
create_repository - Create new repositories
search_code - Search code across repositories
π Pull Request Workflows (10 tools)
list_pull_requests - List PRs with state filtering
get_pull_request - Get detailed PR information
create_pull_request - Create new pull requests
update_pull_request - Update PR title/description
merge_pull_request - Merge PRs with different strategies
decline_pull_request - Decline pull requests
approve_pull_request - Approve pull requests
unapprove_pull_request - Remove PR approvals
list_pr_comments - List PR comments
add_pr_comment - Add comments to PRs
πΏ Branch Operations (4 tools)
list_branches - List all repository branches
get_branch - Get branch details
create_branch - Create new branches
delete_branch - Delete branches
π Commit Inspection (3 tools)
list_commits - List commits with optional branch filtering
get_commit - Get commit details
get_commit_diff - Get commit diffs
π Issue Tracking (4 tools)
list_issues - List repository issues
get_issue - Get issue details
create_issue - Create new issues
update_issue - Update existing issues
π’ Workspace Management (2 tools)
list_workspaces - List accessible workspaces
get_workspace - Get workspace details
Related MCP server: Bitbucket MCP Server
Installation
cd bitbucket-mcp
pip install -e ".[dev]"Configuration
Create a Bitbucket App Password:
Go to Bitbucket Settings β Personal settings β App passwords
Create a new app password with these permissions:
Repositories: Read, Write
Pull requests: Read, Write
Issues: Read, Write
Set up environment variables:
cp .env.example .env # Edit .env and add your credentials
Usage
Configure in Antigravity (or other MCP clients)
Add this to your MCP configuration file (e.g., ~/.gemini/antigravity/mcp_config.json):
{
"mcpServers": {
"bitbucket-mcp": {
"command": "/path/to/your/project/.venv/bin/python",
"args": [
"/path/to/your/project/src/server.py"
],
"env": {
"MCP_MODE": "stdio"
}
}
}
}Note: Replace /path/to/your/project/ with the actual path to this Bitbucket MCP directory.
Important: Credentials are loaded from the .env file in the project directory, NOT from the MCP config. This keeps your credentials secure and out of the MCP configuration.
Running the MCP Server
python -m srcExample Tool Usage
The server exposes tools through the MCP protocol. Here are some examples:
List repositories:
{
"tool": "list_repositories",
"arguments": {
"workspace": "my-workspace"
}
}Create a pull request:
{
"tool": "create_pull_request",
"arguments": {
"workspace": "my-workspace",
"repo_slug": "my-repo",
"title": "Add new feature",
"source_branch": "feature/new-feature",
"destination_branch": "main",
"description": "This PR adds a new feature"
}
}Search code:
{
"tool": "search_code",
"arguments": {
"workspace": "my-workspace",
"repo_slug": "my-repo",
"search_query": "function_name"
}
}Development
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytestLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP Server for JFrog, providing tools for development and artifact management.
A MCP server built for developers enabling Git based project management with project and personalβ¦
Create, deploy, and operate MCP servers directly from your GitHub repositories.
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
Related MCP Servers
- AlicenseBqualityAmaintenanceMCP server with 58 tools for Bitbucket API operations. Manage repositories, pull requests, pipelines, branches, commits, deployments, webhooks, and more.582MIT
- AlicenseBqualityDmaintenanceAn MCP server that provides tools for interacting with the Bitbucket API, supporting both Bitbucket Cloud and Bitbucket Server, enabling pull request, branch, file, code review, and search operations.195,589MIT
- AlicenseBqualityDmaintenanceA professional MCP server for Bitbucket Server that enables automation of pull request management, code review, and repository operations.18291MIT
- AlicenseBqualityBmaintenanceAn MCP server for Atlassian Bitbucket Server / Data Center, providing 66 tools for managing projects, repositories, branches, files, commits, pull requests, and code search with opt-in deletion operations.571MIT