Gitee MCP 服务器
一个为 Gitee 提供的 Model Context Protocol (MCP) 服务实现,支持管理仓库、问题、拉取请求等。
快速入门
安装
前置条件
- 安装 Go 1.23.0 或更高版本
- 获取 Gitee 账户的访问令牌:前往获取
构建
- 克隆代码库: git clone https://gitee.com/oschina/mcp-gitee.git cd mcp-gitee
- 编译项目: make build 将 ./bin/mcp-gitee 添加到 PATH 环境变量
或者使用 go install 安装: go install gitee.com/oschina/mcp-gitee@latest
使用
检查版本: mcp-gitee --version
配置文件示例:
-
npx 配置: { "mcpServers": { "gitee": { "command": "npx", "args": ["-y", "@gitee/mcp-gitee@latest"], "env": { "GITEE_API_BASE": "https://gitee.com/api/v5", "GITEE_ACCESS_TOKEN": "
" } } } } -
可执行文件配置: { "mcpServers": { "gitee": { "command": "mcp-gitee", "env": { "GITEE_API_BASE": "https://gitee.com/api/v5", "GITEE_ACCESS_TOKEN": "
" } } } }
命令行选项
- -token: Gitee 访问令牌
- -api-base: Gitee API 基础 URL(默认值:https://gitee.com/api/v5)
- -version: 显示版本信息
- -transport: 传输类型(stdio 或 sse,默认值:stdio)
- -sse-address: SSE 服务地址和端口(默认值:localhost:8000)
更多工具及用法详见文档。