Gitcode Mcp
БесплатноПоддерживаетсяMCP server for Gitcode platform - Issue and Pull Request operations
Описание
MCP server for Gitcode platform - Issue and Pull Request operations
README
⚠️ AI 生成内容提示
本项目由 AI 辅助生成,实际行为可能因实际代码、接口或平台行为存在偏差。请以仓库源码、GitCode 开放 API 文档 及你所在环境的真实行为为准;涉及鉴权、密钥与生产操作时务必自行核实。
Gitcode MCP Server
基于 Node.js 的 MCP (Model Context Protocol) 服务器,用于 Gitcode 平台的 Issue 和 Pull Request 操作。
仓库:https://github.com/yangxt65535/gitcode-mcp
工具列表
gitcode_list_issues- 列出仓库的 Issuesgitcode_get_issue- 获取单个 Issue 详情gitcode_create_issue- 创建新 Issuegitcode_update_issue- 更新 Issue 信息gitcode_create_issue_comment- 在 Issue 中添加评论gitcode_list_issue_comments- 获取 Issue 的所有评论gitcode_list_pull_requests- 列出仓库的 Pull Requestsgitcode_get_pull_request- 获取单个 Pull Request 详情gitcode_create_pull_request- 创建新 Pull Requestgitcode_update_pull_request- 更新 Pull Request 信息gitcode_create_pull_request_comment- 在 Pull Request 中添加评论gitcode_list_pull_request_comments- 获取 Pull Request 的所有评论gitcode_get_current_user- 获取当前 token 对应的用户信息
仓库查询(远端识别)
gitcode_get_repo- 获取仓库详情(精简输出:full_name、fork/parent、clone URL、namespace、permission)gitcode_list_forks- 列出仓库已有的 Fork(精简输出:full_name、owner、parent、clone URL)
Issue 属性增强(e2e 提单工作流)
gitcode_list_milestones- 获取仓库所有里程碑(返回number+title,number 用于更新 Issue 的milestone字段)gitcode_list_kanbans- 获取企业/组织看板列表(返回id+name;id为字符串雪花 ID,用于gitcode_add_to_kanban的kanban_id,不要转成 number)gitcode_add_to_kanban- 添加 Issue/PR 到看板(更新 Issue 关联看板)。参数:owner、kanban_id、repo(仓库 path 名称)、issue_iids(Issue iid 数组)或pr_iids(PR iid 数组)
gitcode_update_issue 支持的企业版属性(本地白名单校验)
| 参数 | 可选值 | 说明 |
|---|---|---|
issue_severity |
无优先级 / 不重要 / 次要 / 主要 / 严重 |
Issue 优先级(企业版) |
issue_type |
缺陷/Bug / 任务/Task / 需求/Requirement / 测试用例/Test Cases / CVE和安全问题/CVE |
Issue 类型(企业版),传入名称字符串,非 id |
约束:更新
issue_type时不能同时更新任何其他字段(含标题、正文、状态、优先级等),否则本地校验会直接报错,需分多次请求。注意:单独修改
issue_type会清空 issue 的 milestone,改完类型后需重新设置 milestone。
输出精简
Issue / PR 的 list、get、评论列举接口均做了输出精简,仅返回核心字段(如 number、title、state、type、priority、milestone、url 等),去除冗余/低频字段(user.name、labels 颜色、时间戳、reviewer 等),以降低 LLM 上下文占用。
安装
环境变量
| 变量 | 必需 | 说明 |
|---|---|---|
GITCODE_TOKEN |
是 | Gitcode API access_token |
GITCODE_API_URL |
否 | API 基础 URL,默认为 https://api.gitcode.com/api/v5 |
Gitcode API 使用 access_token 作为 Query 参数进行认证:
GET /repos/:owner/:repo/issues/:number?access_token=YOUR_TOKEN
前往 个人设置 - 访问令牌 中创建,确保 token 有必备的权限
添加 MCP
项目已发布到 npm,可直接 npx 使用,无需 clone 和本地构建。具体添加方式参阅各 AI 工具文档。
# claude code
claude mcp add gitcode-mcp --env GITCODE_TOKEN=your_token -- npx @yangxt65535/gitcode-mcp
"gitcode-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"@yangxt65535/gitcode-mcp"
],
"env": {
"GITCODE_TOKEN": "your_token"
}
}
配置
环境变量
| 变量 | 必需 | 说明 |
|---|---|---|
GITCODE_TOKEN |
是 | Gitcode API access_token |
GITCODE_API_URL |
否 | API 基础 URL,默认为 https://api.gitcode.com/api/v5 |
API 认证
Gitcode API 使用 access_token 作为 Query 参数进行认证:
GET /repos/:owner/:repo/issues/:number?access_token=YOUR_TOKEN
前往 个人设置 - 访问令牌 中创建,确保 token 有必备的权限
发布
本包默认公开发布到 npm(@yangxt65535/gitcode-mcp)。推送符合 v* 的 git tag 后,GitHub Actions 会通过 npm Trusted Publishing(OIDC)自动执行 npm publish。
本地发版示例:
npm version patch # 或 minor / major
git push origin master --follow-tags
首次启用前,请在 npmjs 包设置中添加 Trusted Publisher:
- Publisher: GitHub Actions
- Repository:
yangxt65535/gitcode-mcp - Workflow:
publish.yml
注意事项
API 端点和认证方式可能需要根据 Gitcode 实际 API 文档进行调整。请参考:https://docs.gitcode.com/docs/apis/
Установить Gitcode Mcp в Claude Desktop, Claude Code, Cursor
unyly install gitcode-mcpСтавит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.
Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh
Или настроить вручную
Выполни в терминале:
claude mcp add gitcode-mcp --env GITCODE_TOKEN="" -- npx -y @yangxt65535/gitcode-mcpПошаговые гайды: как установить Gitcode Mcp
FAQ
Gitcode Mcp MCP бесплатный?
Да, Gitcode Mcp MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Gitcode Mcp?
Да, требуются переменные окружения: GITCODE_TOKEN. Unyly подставит их в конфиг при установке.
Gitcode Mcp — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Gitcode Mcp в Claude Desktop, Claude Code или Cursor?
Открой Gitcode Mcp на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectAmap Maps Mcp Server
MCP server for using the AMap Maps API
автор: duxiaohuiSupabase
Database, auth and storage
автор: SupabaseEverything
Reference / test server with prompts, resources, and tools.
Git
Tools to read, search, and manipulate Git repositories.
Sequential Thinking
Dynamic and reflective problem-solving through thought sequences.
Time
Time and timezone conversion capabilities.
Compare Gitcode Mcp with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
