这是用于Bitbucket集成的MCP服务器的Python实现。MCP(模型上下文协议)使AI应用程序能够安全地访问本地工具。该服务器在您的AI应用程序所在的同一台机器上运行。
# 在本地安装服务器
git clone https://github.com/kallows/mcp-bitbucket.git
此MCP服务器提供了以下Bitbucket集成工具:
bb_create_repository:创建一个新的Bitbucket仓库
bb_create_branch:在仓库中创建一个新分支
bb_delete_repository:删除一个Bitbucket仓库
bb_read_file:从仓库读取文件
bb_write_file:在仓库中创建或更新文件
bb_create_issue:在仓库中创建一个问题
bb_delete_issue:从仓库中删除一个问题
必需参数:repo_slug, issue_id
可选参数:workspace(默认为kallows)
bb_search_repositories:使用查询语法搜索Bitbucket仓库
bb_delete_file:从仓库中删除文件
bb_create_pull_request:创建拉取请求
服务器需要将Bitbucket凭据设置为环境变量:
export BITBUCKET_USERNAME="your-username"
export BITBUCKET_APP_PASSWORD="your-app-password"
mcp-bitbucket/
├── README.md
├── pyproject.toml
├── src/
│ └── bitbucket_api/
│ ├── __init__.py
│ └── server.py
└── tests/
├── __init__.py
├── test_bb_api.py
└── test_bb_integration.py