Bitbucket MCP Server
Enables MCP-compatible clients to read repositories and source code from Bitbucket. Provides tools for listing workspaces and repositories, browsing directories, reading files, searching code, and inspecting commits and pull requests.
README
Bitbucket MCP Server
A Model Context Protocol (MCP) server for Bitbucket that allows MCP-compatible clients (such as Claude Desktop) to read repositories and source code from your Bitbucket workspace.
Features
This server provides the following tools:
| Tool | Description |
|---|---|
list_workspaces |
List all Bitbucket workspaces accessible by your account |
list_repositories |
List repositories in a workspace |
get_repository |
Get repository details |
list_branches |
List branches in a repository |
list_commits |
List commit history |
get_commit |
Get details for a specific commit |
browse_directory |
Browse repository directory structure |
get_file_content |
Read file contents |
search_code |
Search code in a repository |
get_pull_requests |
List pull requests |
get_readme |
Read a repository README |
get_commit_diff |
Show commit diff |
Prerequisites
- Node.js 18 or newer
- Bitbucket account with access to the repositories you want to read
- Bitbucket App Password (do not use your regular account password)
Create a Bitbucket App Password
- Sign in to Bitbucket
- Click your avatar (bottom-right) → Personal settings
- Open App passwords in the left menu
- Click Create app password
- Add a label (for example:
MCP Server) - Grant the following permissions:
- Repositories:
Read - Pull requests:
Read - Workspace:
Read
- Repositories:
- Click Create and save the generated password (it is shown only once)
Installation
# Clone or enter the project folder
cd d:\Projects\Pribadi\MCP_bitbucket
# Install dependencies
npm install
# Build
npm run build
Configure Claude Desktop
1) Open Claude Desktop config file
Windows
%APPDATA%\Claude\claude_desktop_config.json
macOS
~/Library/Application Support/Claude/claude_desktop_config.json
2) Add MCP server configuration
Add this entry to your claude_desktop_config.json:
{
"mcpServers": {
"bitbucket": {
"command": "node",
"args": ["d:\\Projects\\Pribadi\\MCP_bitbucket\\dist\\index.js"],
"env": {
"BITBUCKET_USERNAME": "your-bitbucket-username",
"BITBUCKET_APP_PASSWORD": "your-app-password",
"BITBUCKET_WORKSPACE": "your-workspace-slug"
}
}
}
}
Notes:
- Replace
your-bitbucket-usernamewith your Bitbucket username - Replace
your-app-passwordwith your Bitbucket App Password - Replace
your-workspace-slugwith your workspace slug (optional; you can also pass workspace as a tool parameter) - Use double backslashes (
\\) in Windows paths
3) Restart Claude Desktop
Close and reopen Claude Desktop so it can load the MCP server.
Usage Examples
After setup, you can ask Claude:
- "List all repositories in my workspace"
- "Read
src/index.tsfrom repositorymy-project" - "Show the folder structure of repository
backend-api" - "Search for
validateUserusage in repositoryauth-service" - "Show recent commits from branch
develop" - "Read README from repository
frontend-app" - "Show open pull requests"
Development
# Build
npm run build
# Run manually (for testing)
BITBUCKET_USERNAME=user BITBUCKET_APP_PASSWORD=pass npm start
Project Structure
MCP_bitbucket/
├── src/
│ ├── index.ts # Entry point and MCP server setup
│ ├── bitbucket-client.ts # Bitbucket API client
│ └── tools.ts # MCP tool definitions
├── dist/ # Compiled JavaScript output
├── package.json
├── tsconfig.json
└── README.md
Security
- Store App Password in environment variables, not in source code
- Use read-only permissions whenever possible
- All communication uses HTTPS
- Never commit credentials into the repository
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.