AtomCode 中配置 AtomGit Issue 提交通道 — Skill + MCP 全局安装指南
AtomCode 中配置 AtomGit Issue 提交通道 — Skill + MCP 全局安装指南
2026-07-17 · 阅读约 8 分钟
前言
AtomCode 是 AtomGit 推出的 AI 编程助手,支持通过 MCP(Model Context Protocol) 和 Skill 机制扩展能力。本文将一步步完成全局配置,让 AtomCode 能够直接调用 AtomGit API 创建 Issue,无需离开编辑器手动打开网页。
💡 效果预览: 配置完成后,只需在对话中说"帮我给
my-org/my-repo提个 Issue,标题是……",AtomCode 就会自动调用 MCP 工具创建 Issue,整个过程在聊天窗口内完成。
整体架构
这套方案由两个部分组成:
| 组件 | 作用 | 安装位置 |
|---|---|---|
| MCP Server | 提供与 AtomGit API 交互的工具(create_issue、list_issues 等 274+ 个工具) | ~/.atomcode/mcp.json(全局) |
| Skill | 封装 Issue 管理的工作流程,指导 AI 如何正确使用 MCP 工具 | ~/.atomcode/skills/atomgit-issue/SKILL.md(全局) |
~/.atomcode/
├── mcp.json ← MCP 服务配置
└── skills/
└── atomgit-issue/
└── SKILL.md ← Issue 管理技能
第一步:获取 AtomGit Token
所有 AtomGit OpenAPI 请求都需要 Bearer Token 认证。Token 在 atomgit.com 和 gitcode.com 通用(共享同一套后端)。
-
进入 Token 管理页面
访问 https://atomgit.com/setting/token-classic 或从 AtomGit 头像菜单 → 设置 → 个人访问令牌进入。
-
创建新 Token
填写名称(如
atomcode-mcp),选择过期时间,勾选以下权限:api— 完整 API 访问权限issues— Issue 读写权限read_user— 读取用户信息read_repository— 读取仓库信息
-
复制并保存 Token
生成后立即复制 Token 字符串(关闭页面后将不再显示)。将其保存到安全位置,下一步会用到。
⚠️ 安全提示: Token 相当于你的密码,不要提交到 Git 仓库、不要分享给他人。建议使用环境变量而非硬编码在配置文件中。
第二步:全局安装 MCP Server
AtomCode 的 MCP 配置支持项目级(.mcp.json)和全局级(~/.atomcode/mcp.json)。为了让所有项目都能使用 AtomGit 提 Issue,我们采用全局安装。
编辑 ~/.atomcode/mcp.json,写入以下内容:
{
"mcpServers": {
"atomgit": {
"command": "npx",
"args": ["-y", "@atomgit.com/atomgit-mcp-server"],
"env": {
"ATOMGIT_TOKEN": "__ATOMGIT_TOKEN__"
}
}
}
}
或者使用 atomcode mcp add 命令一键添加:
atomcode mcp add atomgit npx -y @atomgit.com/atomgit-mcp-server --global
📦 关于 MCP Server 包:
@atomgit.com/atomgit-mcp-server是 AtomGit 官方发布的 npm 包,提供 274+ 个工具,覆盖仓库、Issue、PR、分支、标签、文件等操作。安全模式下危险操作(delete/remove/archive/transfer)默认不暴露。
配置环境变量
将第一步获取的 Token 配置到环境变量中。推荐写入 shell 配置文件(如 ~/.zshrc 或 ~/.bashrc):
# ~/.zshrc
export ATOMGIT_TOKEN="你的token"
然后使其生效:
source ~/.zshrc
💡 提示: 如果不想在全局环境变量中暴露 Token,也可以在 MCP 配置的
env字段中直接填写,但注意~/.atomcode/mcp.json不应公开分享。
第三步:全局安装 Skill
Skill 是 AtomCode 的可复用技能包,告诉 AI “遇到这类任务应该怎么做”。我们创建一个专门的 atomgit-issue Skill 来管理 Issue 提交流程。
创建目录和文件:
mkdir -p ~/.atomcode/skills/atomgit-issue
在 ~/.atomcode/skills/atomgit-issue/SKILL.md 中写入:
---
name: atomgit-issue
description: Create and manage issues on AtomGit (atomgit.com) / GitCode
repositories. Use when filing bug reports, feature requests, or tracking tasks.
---
# AtomGit Issue 管理
通过 AtomGit MCP Server 创建和管理 AtomGit/GitCode 平台上的 Issue。
## 前置条件
1. **AtomGit Token** — 已配置在 `ATOMGIT_TOKEN` 环境变量中
- 生成地址:https://atomgit.com/setting/token-classic
- 所需权限:`api`, `issues`
2. **AtomGit MCP Server** — 已通过 `~/.atomcode/mcp.json` 全局注册
## 工作流程
### 1. 创建 Issue
使用 `mcp__atomgit__create_issue` 工具创建 Issue:
| 参数 | 必填 | 说明 |
|------|------|------|
| owner | 是 | 仓库所有者(用户名或组织名) |
| repo | 是 | 仓库名称 |
| title | 是 | Issue 标题 |
| body | 是 | Issue 内容(Markdown 格式) |
| assignees | 否 | 负责人列表 |
| labels | 否 | 标签列表 |
| milestone | 否 | 里程碑编号 |
### 2. 查询 Issue
使用 `mcp__atomgit__list_issues` 或 `mcp__atomgit__get_issue` 查看 Issue 列表或详情。
### 3. 评论 Issue
使用 `mcp__atomgit__create_issue_comment` 为 Issue 添加评论。
💡 Skill 加载机制: AtomCode 启动时会自动扫描
~/.atomcode/skills/目录下的所有SKILL.md文件。Skill 支持三种调用方式:
- 斜杠命令:输入
/atomgit-issue手动触发- Dollar 菜单:输入
$atomgit-issue带参数调用- AI 自动调用:对话涉及 Issue 相关内容时,AtomCode 自动匹配并执行
第四步:重启 AtomCode 并验证
MCP 配置在 AtomCode 启动时加载,因此需要重启才能生效:
-
完全退出 AtomCode — 确保 AtomCode 进程已终止(包括终端中的进程)。
-
重新启动 AtomCode — 在终端中重新启动 AtomCode。启动日志中会看到 MCP 连接信息。
-
验证 MCP 连接状态 — 在 AtomCode 中输入
/mcp查看已连接的 MCP 服务列表。如果看到atomgit出现在列表中,说明连接成功。 -
验证 Skill 加载 — 输入
/skills查看所有已加载的 Skill,atomgit-issue应出现在列表中。
使用示例
配置完成后,你就可以在对话中直接让 AtomCode 提 Issue 了:
示例 1:创建 Bug 报告
你:帮我在 my-org/my-repo 提一个 Bug Issue,标题是"登录页面在移动端布局错乱",
内容:描述一下在 iOS Safari 上输入框被键盘遮挡的问题
AtomCode:好的,我来创建 Issue。
→ 调用 mcp__atomgit__create_issue(owner="my-org", repo="my-repo",
title="登录页面在移动端布局错乱", body="...")
→ Issue 已创建!链接:https://atomgit.com/my-org/my-repo/issues/42
示例 2:查询已有 Issue
你:看看 my-org/my-repo 有哪些未关闭的 Issue
AtomCode:→ 调用 mcp__atomgit__list_issues(owner="my-org", repo="my-repo", state="open")
→ 当前有 3 个未关闭的 Issue:
1. #42 登录页面在移动端布局错乱
2. #41 添加暗黑模式支持
3. #39 优化首页加载速度
常见问题
MCP 连接失败怎么办?
如果 /mcp 中看不到 atomgit 服务,可能的原因:
- Node.js 未安装 — MCP Server 需要 Node.js 18+,下载 nodejs.org
- 环境变量未设置 — 确认
ATOMGIT_TOKEN已正确设置且重启了终端 - npx 找不到包 — 尝试手动运行
npx @atomgit.com/atomgit-mcp-server看报错信息 - JSON 格式错误 — 检查
~/.atomcode/mcp.json的 JSON 语法
Token 有什么权限要求?
至少需要 api 和 issues 权限。如果还需要操作 PR、仓库等,请追加对应权限。
项目级配置 vs 全局配置
全局配置对当前用户所有项目生效。如果只想在某个特定项目中使用,可以将 mcp.json 和 .atomcode/skills/ 放在项目根目录下。项目级配置会覆盖全局配置中同名的 MCP Server。
总结
通过本文的配置,你实现了:
- ✅ 全局 MCP 服务 — AtomCode 可直接调用 AtomGit 的 274+ 个 API
- ✅ Issue 管理 Skill — 规范的提 Issue 工作流程,AI 自动遵循最佳实践
- ✅ 跨项目可用 — 全局安装后,在任何项目中都能直接提 Issue
这套机制不仅适用于 AtomGit Issue,同样可以扩展到 Pull Request 管理、代码审查、仓库管理等场景。基于 MCP + Skill 的组合,AtomCode 从一个对话助手变成了真正的开发工作流自动化平台。
🔗 相关资源:
- AtomGit MCP Server 源码:https://atomgit.com/zkxw2008/AtomGit-MCP-Server
- AtomCode 官方文档:https://atomcode.atomgit.com/docs/en/mcp.html
- AtomGit Token 管理:https://atomgit.com/setting/token-classic
更多推荐




所有评论(0)