CANN GitCode MCP Server - GitCode platform tools for CANN developers
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"cann-gitcode-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# cann-gitcode-mcp [](https://pypi.org/project/cann-gitcode-mcp/) [](https://pypi.org/project/cann-gitcode-mcp/) [](https://github.com/shengnan666/cann-gitcode-mcp/blob/main/LICENSE) CANN 社区的代码托管在 [GitCode](https://gitcode.com/) 平台。`cann-gitcode-mcp` 将 GitCode API 封装为 [MCP](https://modelcontextprotocol.io/) 工具,让 CANN 开发者在 Claude Code 等 AI 助手中直接操作仓库的 Pull Request、Issue、流水线等,无需离开对话界面。 ## 快速开始 ### 1. 安装 ```bash pip install cann-gitcode-mcp ``` ### 2. 配置 Claude Code 先在 [GitCode 用户设置](https://gitcode.com/setting/token-classic) 中生成个人访问令牌,然后按需选择配置范围: **方式一:当前用户范围(对本用户的所有项目生效)** 编辑 `~/.claude.json`,在顶层添加 `mcpServers` 字段: ```json { "mcpServers": { "cann-gitcode": { "command": "cann-gitcode-mcp", "env": { "GITCODE_API_TOKEN": "your_token_here" } } } } ``` **方式二:仅当前工程生效(可提交到版本库,团队共享)** 在项目根目录创建或编辑 `.mcp.json`: ```json { "mcpServers": { "cann-gitcode": { "command": "cann-gitcode-mcp", "env": { "GITCODE_API_TOKEN": "your_token_here" } } } } ``` > **注意**:`.mcp.json` 若提交到版本库,其他协作者也会加载该 MCP 配置,但每人需在自己机器上安装 `cann-gitcode-mcp` 并填写自己的 Token。如果 Token 因人而异,可将 `.mcp.json` 加入 `.gitignore`,或仅配置不含 Token 的部分,通过其他方式注入环境变量。 重启 Claude Code 即可使用。 > **环境变量说明**:Token 通过 MCP 配置的 `env` 字段传入即可,无需手动 `export`。如需覆盖 API 地址,可额外设置 `GITCODE_API_BASE_URL`(默认 `https://gitcode.com/api/v5`)。 ## 可用工具 ### Pull Request | 工具名 | 说明 | |--------|------| | `create_pull_request` | 创建 Pull Request | | `list_pull_requests` | 列出仓库的 Pull Request(支持状态、排序等过滤) | | `get_pull_request` | 获取指定 PR 的详细信息 | | `merge_pull_request` | 合并 Pull Request | | `comment_pull_request` | 在 PR 上发表评论 | | `get_pull_request_files` | 获取 PR 的变更文件列表 | | `list_pull_request_comments` | 获取 PR 的所有评论 | ### Pipeline(流水线) | 工具名 | 说明 | |--------|------| | `trigger_pr_pipeline` | 向…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.