{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_rmpnk6mbkhbv","handle":"cann-gitcode-mcp","url":"https://wellknown.network/agents/cann-gitcode-mcp","links":{"self":"https://wellknown.network/agents/cann-gitcode-mcp/record.json","html":"https://wellknown.network/agents/cann-gitcode-mcp","markdown":"https://wellknown.network/agents/cann-gitcode-mcp/record.md","api":"https://wellknown.network/api/v1/agents/cann-gitcode-mcp","status":"https://wellknown.network/api/v1/agents/cann-gitcode-mcp/status","claim":"https://wellknown.network/agents/cann-gitcode-mcp/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/cann-gitcode-mcp/claim.json","badge":"https://wellknown.network/agents/cann-gitcode-mcp/badge.svg","openapi":"https://wellknown.network/openapi.json"},"ard":{"identifier":"urn:air::server:cann-gitcode-mcp","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"cann-gitcode-mcp","summary":"CANN GitCode MCP Server - GitCode platform tools for CANN developers","description":"# cann-gitcode-mcp\n\n[![PyPI version](https://img.shields.io/pypi/v/cann-gitcode-mcp)](https://pypi.org/project/cann-gitcode-mcp/)\n[![Python](https://img.shields.io/pypi/pyversions/cann-gitcode-mcp)](https://pypi.org/project/cann-gitcode-mcp/)\n[![License](https://img.shields.io/pypi/l/cann-gitcode-mcp)](https://github.com/shengnan666/cann-gitcode-mcp/blob/main/LICENSE)\n\nCANN 社区的代码托管在 [GitCode](https://gitcode.com/) 平台。`cann-gitcode-mcp` 将 GitCode API 封装为 [MCP](https://modelcontextprotocol.io/) 工具，让 CANN 开发者在 Claude Code 等 AI 助手中直接操作仓库的 Pull Request、Issue、流水线等，无需离开对话界面。\n\n## 快速开始\n\n### 1. 安装\n\n```bash\npip install cann-gitcode-mcp\n```\n\n### 2. 配置 Claude Code\n\n先在 [GitCode 用户设置](https://gitcode.com/setting/token-classic) 中生成个人访问令牌，然后按需选择配置范围：\n\n**方式一：当前用户范围（对本用户的所有项目生效）**\n\n编辑 `~/.claude.json`，在顶层添加 `mcpServers` 字段：\n\n```json\n{\n  \"mcpServers\": {\n    \"cann-gitcode\": {\n      \"command\": \"cann-gitcode-mcp\",\n      \"env\": {\n        \"GITCODE_API_TOKEN\": \"your_token_here\"\n      }\n    }\n  }\n}\n```\n\n**方式二：仅当前工程生效（可提交到版本库，团队共享）**\n\n在项目根目录创建或编辑 `.mcp.json`：\n\n```json\n{\n  \"mcpServers\": {\n    \"cann-gitcode\": {\n      \"command\": \"cann-gitcode-mcp\",\n      \"env\": {\n        \"GITCODE_API_TOKEN\": \"your_token_here\"\n      }\n    }\n  }\n}\n```\n\n> **注意**：`.mcp.json` 若提交到版本库，其他协作者也会加载该 MCP 配置，但每人需在自己机器上安装 `cann-gitcode-mcp` 并填写自己的 Token。如果 Token 因人而异，可将 `.mcp.json` 加入 `.gitignore`，或仅配置不含 Token 的部分，通过其他方式注入环境变量。\n\n重启 Claude Code 即可使用。\n\n> **环境变量说明**：Token 通过 MCP 配置的 `env` 字段传入即可，无需手动 `export`。如需覆盖 API 地址，可额外设置 `GITCODE_API_BASE_URL`（默认 `https://gitcode.com/api/v5`）。\n\n## 可用工具\n\n### Pull Request\n\n| 工具名 | 说明 |\n|--------|------|\n| `create_pull_request` | 创建 Pull Request |\n| `list_pull_requests` | 列出仓库的 Pull Request（支持状态、排序等过滤） |\n| `get_pull_request` | 获取指定 PR 的详细信息 |\n| `merge_pull_request` | 合并 Pull Request |\n| `comment_pull_request` | 在 PR 上发表评论 |\n| `get_pull_request_files` | 获取 PR 的变更文件列表 |\n| `list_pull_request_comments` | 获取 PR 的所有评论 |\n\n### Pipeline（流水线）\n\n| 工具名 | 说明 |\n|--------|------|\n| `trigger_pr_pipeline` | 向…","publisher":null,"homepage":"https://gitcode.com/shengnan666/cann-gitcode-mcp","repository":"https://gitcode.com/shengnan666/cann-gitcode-mcp","version":"0.3.0","license":null,"protocols":["mcp"],"tags":["cann","gitcode","mcp","model-context-protocol"],"pricing":null,"endpoints":[{"url":"pypi:cann-gitcode-mcp","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","repoUrl":"pypi","summary":"pypi","version":"pypi","description":"pypi","homepageUrl":"pypi"}},"derived":{"capabilities":[{"slug":"dev.version-control","name":"Version Control","confidence":0.848,"provenance":"derived"}],"categories":["dev"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"cann-gitcode-mcp","registry":"pypi","observedAt":"2026-09-09T11:32:10.965Z","publishedAt":"2026-04-02T03:20:04.519757Z","latestVersion":"0.3.0"}},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"cann-gitcode-mcp","url":"https://pypi.org/project/cann-gitcode-mcp/","firstSeenAt":"2026-09-09T11:29:31.652Z","fetchedAt":"2026-09-09T11:29:31.652Z","normalizedAt":"2026-09-09T11:29:31.652Z"}]},"firstSeenAt":"2026-09-09T11:29:31.652Z","updatedAt":"2026-09-09T11:32:10.965Z"}