MCP Bitbucket Python是一个用Python实现的MCP服务器,用于与Bitbucket进行集成。MCP(模型上下文协议)可让AI应用程序安全地访问本地工具,该服务器会在与AI应用程序相同的机器上本地运行。
# 本地安装服务器
git clone https://github.com/kallows/mcp-bitbucket.git
服务器需要将Bitbucket凭证设置为环境变量:
export BITBUCKET_USERNAME="your-username"
export BITBUCKET_APP_PASSWORD="your-app-password"
此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:删除仓库中的问题
bb_search_repositories:使用查询语法搜索Bitbucket仓库
bb_delete_file:删除仓库中的文件
bb_create_pull_request:创建拉取请求
mcp-bitbucket/
├── README.md
├── pyproject.toml
├── src/
│ └── bitbucket_api/
│ ├── __init__.py
│ └── server.py
└── tests/
├── __init__.py
├── test_bb_api.py
└── test_bb_integration.py