Enables searching code, browsing files, managing pull requests, and exploring repositories and projects within a Bitbucket Data Center instance.
Click on "Install 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., "@mcp-bitbucket-dcSearch for the DatabaseHelper class in the backend-api repository"
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.
mcp-bitbucket-dc
MCP (Model Context Protocol) server for Bitbucket Data Center. Enables AI assistants to search code, browse files, manage pull requests, and explore repositories through a standardized interface.
Built with FastMCP in Python. Installs via uvx — no Node.js required.
Quick Start
1. Generate a Personal Access Token
Log in to your Bitbucket Data Center instance
Go to Manage Account → HTTP access tokens
Click Create token
Set permissions: Repository Read (and Write if you need PR creation/commenting)
Copy the token
2. Configure Your IDE
Add to your MCP configuration (mcp.json in VS Code, claude_desktop_config.json for Claude Desktop):
That's it. The server starts automatically when your IDE connects.
3. Start Using
Ask your AI assistant:
"Search for CompanyInfoUpdater in the codebase"
"Show me the file structure of the api-service repo in PROJECT"
"Get the content of src/main/Application.java from repo backend"
"List open pull requests in PROJECT/my-repo"
"What branches exist in PROJECT/my-repo?"
Tools Reference
Code Search (NEW)
Tool | Description |
| Search code across all repos with Lucene syntax ( |
File Browsing (NEW)
Tool | Description |
| Browse directory tree (files & folders at a path) |
| Get raw file content with syntax highlighting |
| Recursively list all file paths in a repo |
| List branches (filterable) |
| List tags (filterable) |
Projects & Repositories
Tool | Description |
| List projects (filterable by name/permission) |
| Get project details |
| List repos in a project |
| Get repo details with clone URLs |
Pull Requests
Tool | Description |
| List PRs (filter by state, direction, text) |
| Get PR details with reviewers |
| Get PR comments and activity |
| Get files changed in a PR |
| Get diff for a file in a PR |
| Post a comment (general or inline) |
| Create a new PR |
| Update PR title/description/reviewers |
| Get required reviewers for a branch pair |
Commits
Tool | Description |
| List commits (filter by path, ref range) |
Search Query Syntax
The bitbucket_code_search tool uses Lucene-style queries:
Configuration
Environment Variable | Required | Description |
| Yes* | Bitbucket DC hostname (e.g. |
| Yes* | Full base URL alternative (e.g. |
| Yes | Personal Access Token |
* Provide either BITBUCKET_HOST or BITBUCKET_URL, not both.
Alternative Transports
Development
License
MIT — see LICENSE.