remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
Enables AI to interact with Gitee repositories, including creating/managing repositories, branches, files, issues, and pull requests. Supports operations like pushing code, creating issues, managing PRs, and performing user-related actions on Gitee's platform.
Gitee MCP 服务器
让 AI 通过 MCP 为您操作 Gitee 仓库/Issues/Pull Requests
支持的AI操作
类别 | MCP 工具 | 描述 |
---|---|---|
存储库操作 | create_repository | 创建 Gitee 存储库 |
fork_repository | 派生一个 Gitee 存储库 | |
分支机构运营 | create_branch | 在 Gitee 存储库中创建新分支 |
list_branches | 列出 Gitee 存储库中的分支 | |
get_branch | 获取 Gitee 存储库中特定分支的详细信息 | |
文件操作 | get_file_contents | 获取 Gitee 存储库中文件或目录的内容 |
create_or_update_file | 在 Gitee 存储库中创建或更新文件 | |
push_files | 将多个文件推送到 Gitee 存储库 | |
发行操作 | create_issue | 在 Gitee 仓库中创建问题 |
list_issues | 列出 Gitee 存储库中的问题 | |
get_issue | 获取 Gitee 存储库中特定问题的详细信息 | |
update_issue | 更新 Gitee 存储库中的问题 | |
add_issue_comment | 向 Gitee 存储库中的问题添加评论 | |
拉取请求操作 | create_pull_request | 在 Gitee 存储库中创建 Pull 请求 |
list_pull_requests | 列出 Gitee 存储库中的 Pull 请求 | |
get_pull_request | 获取 Gitee 存储库中特定 Pull 请求的详细信息 | |
update_pull_request | 更新 Gitee 存储库中的 Pull 请求 | |
merge_pull_request | 在 Gitee 存储库中合并拉取请求 | |
用户操作 | get_user | 获取Gitee用户信息 |
get_current_user | 获取已认证的Gitee用户信息 |
用法
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Gitee MCP 服务器:
配置
GITEE_API_BASE_URL
:可选,Gitee OpenAPI Endpoint,默认为https://gitee.com/api/v5
GITEE_PERSONAL_ACCESS_TOKEN
:必需,Gitee 帐户个人访问令牌(PAT),可从 Gitee 帐户设置个人访问令牌中获取DEBUG
:可选,设置为true
以启用调试日志记录,默认为禁用
通过 NPX 运行 MCP 服务器
通过 Docker 容器运行 MCP 服务器
- 获取 Docker 镜像
- 配置 MCP 服务器
开发指南
安装依赖项
建造
成功构建后, /dist
将包含可运行的 MCP 服务器。
运行服务器
MCP 服务器将在 stdio 上运行,允许 MCP 客户端将其用作子进程。
构建 Docker 镜像
您还可以使用 Docker 运行服务器:
使用 Docker 运行 MCP 服务器:
调试 MCP 服务器
您可以使用@modelcontextprotocol/inspector
进行调试:
在根目录中创建一个.env
文件用于环境变量:
运行调试工具,启动服务和Web调试界面:
项目包含一个debug()
函数,用于打印调试信息,用法:
仅当DEBUG
环境变量设置为true
时才会打印调试日志。
依赖项
@modelcontextprotocol/sdk
:用于服务器实现的 MCP SDKuniversal-user-agent
:用于生成用户代理字符串zod
:用于模式验证zod-to-json-schema
:用于将 Zod 模式转换为 JSON 模式
执照
本软件遵循 MIT 许可证。您可以自由使用、修改和分发本软件,但须遵守 MIT 许可证的条款和条件。更多详情,请参阅项目代码库中的LICENSE文件。
相关链接
You must be authenticated.
Tools
Gitee 的 MCP 工具服务器,支持存储库文件/分支、问题和拉取请求的管理。