返回市场
MCP-比特桶

MCP-比特桶

作者:Kallows5 星标更新:2025-06-09

项目介绍

MCP Bitbucket Python 🦊

这是用于Bitbucket集成的MCP服务器的Python实现。MCP(模型上下文协议)使AI应用程序能够安全地访问本地工具。该服务器在您的AI应用程序所在的同一台机器上运行。

安装

# 在本地安装服务器
git clone https://github.com/kallows/mcp-bitbucket.git

可用工具

此MCP服务器提供了以下Bitbucket集成工具:

  • bb_create_repository:创建一个新的Bitbucket仓库

    • 必需参数:name(仓库名称)
    • 可选参数:description, workspace(默认为kallows),project_key, is_private(默认为true),has_issues(默认为true)
  • bb_create_branch:在仓库中创建一个新分支

    • 必需参数:repo_slug, branch(新分支的名称)
    • 可选参数:workspace(默认为kallows),start_point(默认为主分支)
  • bb_delete_repository:删除一个Bitbucket仓库

    • 必需参数:repo_slug
    • 可选参数:workspace(默认为kallows)
  • bb_read_file:从仓库读取文件

    • 必需参数:repo_slug, path(仓库中的文件路径)
    • 可选参数:workspace(默认为kallows),branch(默认为主/主分支)
  • bb_write_file:在仓库中创建或更新文件

    • 必需参数:repo_slug, path, content
    • 可选参数:workspace(默认为kallows),branch(默认为主分支),message(提交信息)
  • bb_create_issue:在仓库中创建一个问题

    • 必需参数:repo_slug, title, content
    • 可选参数:workspace(默认为kallows),kind(bug/enhancement/proposal/task),priority(trivial/minor/major/critical/blocker)
  • bb_delete_issue:从仓库中删除一个问题

  • 必需参数:repo_slug, issue_id

  • 可选参数:workspace(默认为kallows)

  • bb_search_repositories:使用查询语法搜索Bitbucket仓库

    • 必需参数:query(例如,'name ~ "test"' 或 'project.key = "PROJ"')
    • 可选参数:workspace(默认为kallows),page(默认为1),pagelen(默认为10,最大值为100)
  • bb_delete_file:从仓库中删除文件

    • 必需参数:repo_slug, path
    • 可选参数:workspace(默认为kallows),branch(默认为主分支),message(提交信息)
  • bb_create_pull_request:创建拉取请求

    • 必需参数:repo_slug, title, source_branch
    • 可选参数:workspace(默认为kallows),destination_branch(默认为主分支),description, close_source_branch(默认为true)

环境设置

服务器需要将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