Bitbucket MCP
Enables AI assistants to manage Bitbucket Cloud repositories, pull requests, branches, commits, pipelines, issues, and webhooks through the Model Context Protocol.
README
Bitbucket MCP
A Model Context Protocol (MCP) server for Bitbucket Cloud. Enables AI assistants to manage repositories, pull requests, pipelines, and more.
Installation
Option 1: Using npx (Recommended)
No installation required. Run directly:
npx @icy-r/bitbucket-mcp
Option 2: Global Installation
npm install -g @icy-r/bitbucket-mcp
bitbucket-mcp
Option 3: Local Development
git clone https://github.com/icy-r/bitbucket-mcp.git
cd bitbucket-mcp
pnpm install
pnpm build
node dist/index.js
MCP Client Configuration
Cursor IDE
Add to your Cursor MCP settings (~/.cursor/mcp.json on Windows: %USERPROFILE%\.cursor\mcp.json):
Using npx (Recommended):
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": ["-y", "@icy-r/bitbucket-mcp"],
"env": {
"BITBUCKET_AUTH_METHOD": "api_token",
"BITBUCKET_USER_EMAIL": "your.email@example.com",
"BITBUCKET_API_TOKEN": "your_api_token"
}
}
}
}
Using local build:
{
"mcpServers": {
"bitbucket": {
"command": "node",
"args": ["D:\\path\\to\\bitbucket-mcp\\dist\\index.js"],
"env": {
"BITBUCKET_AUTH_METHOD": "api_token",
"BITBUCKET_USER_EMAIL": "your.email@example.com",
"BITBUCKET_API_TOKEN": "your_api_token"
}
}
}
}
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": ["-y", "@icy-r/bitbucket-mcp"],
"env": {
"BITBUCKET_AUTH_METHOD": "api_token",
"BITBUCKET_USER_EMAIL": "your.email@example.com",
"BITBUCKET_API_TOKEN": "your_api_token"
}
}
}
}
Other MCP Clients
The server follows the MCP standard and works with any compatible client. Use the configuration pattern above, adjusting paths as needed for your platform.
Authentication
API Token (Recommended)
- Go to Bitbucket API Tokens
- Create a new token with the required permissions
- Set the environment variables:
BITBUCKET_AUTH_METHOD=api_token
BITBUCKET_USER_EMAIL=your.email@example.com
BITBUCKET_API_TOKEN=your_api_token
App Password
- Go to Bitbucket App Passwords
- Create a new app password with required permissions
- Use
basicauth method with your username and app password
Environment Variables
| Variable | Description | Required |
|---|---|---|
BITBUCKET_AUTH_METHOD |
api_token, oauth, basic |
Yes |
BITBUCKET_USER_EMAIL |
Your Atlassian email | For api_token |
BITBUCKET_API_TOKEN |
API token | For api_token |
BITBUCKET_USERNAME |
Bitbucket username | For basic auth |
BITBUCKET_APP_PASSWORD |
App password | For basic auth |
BITBUCKET_WORKSPACE |
Default workspace | No |
BITBUCKET_OUTPUT_FORMAT |
json, toon, compact |
No |
Available Tools
| Tool | Actions |
|---|---|
bitbucket_workspaces |
list, get, list_projects, list_members |
bitbucket_repositories |
list, get, create, delete, fork, get_file, list_source |
bitbucket_pull_requests |
list, get, create, update, merge, approve, unapprove, decline, list_comments, add_comment, get_diff |
bitbucket_branches |
list_branches, get_branch, create_branch, delete_branch, list_tags, get_tag, create_tag |
bitbucket_commits |
list, get, get_diff, get_diffstat |
bitbucket_pipelines |
list, get, trigger, trigger_custom, stop, list_steps, get_step, get_logs, get_config, set_enabled, list_variables, get_variable, create_variable, update_variable, delete_variable |
bitbucket_issues |
list, get, create, update, delete, list_comments, add_comment, vote, unvote, watch, unwatch |
bitbucket_webhooks |
list, get, create, update, delete, list_workspace, get_workspace, create_workspace, update_workspace, delete_workspace |
Output Formats
Control response verbosity with the format parameter:
| Format | Description | Token Savings |
|---|---|---|
json |
Full JSON output | 0% |
toon |
Compact TOON format | ~50% |
compact |
Essential fields only | ~76% |
Example usage:
{ "action": "list", "workspace": "my-workspace", "format": "compact" }
Examples
List repositories in a workspace
{
"action": "list",
"workspace": "my-workspace"
}
Create a pull request
{
"action": "create",
"workspace": "my-workspace",
"repo_slug": "my-repo",
"title": "Feature: Add new functionality",
"source_branch": "feature/new-feature",
"destination_branch": "main"
}
Trigger a pipeline
{
"action": "trigger",
"workspace": "my-workspace",
"repo_slug": "my-repo",
"branch": "main"
}
Development
# Clone the repository
git clone https://github.com/icy-r/bitbucket-mcp.git
cd bitbucket-mcp
# Install dependencies
pnpm install
# Build
pnpm build
# Run tests
pnpm test
# Run in development mode (watch)
pnpm dev
# Lint and format
pnpm lint
pnpm format
Requirements
- Node.js >= 20.0.0
- pnpm (for development)
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。