bitbucket-mcp
A comprehensive MCP server for Bitbucket integration, providing 27 tools to manage repositories, pull requests, branches, commits, issues, and workspaces.
README
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
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 src
Example 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
pytest
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.