
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
本镜像提供与GitHub API交互的工具集,支持文件操作、仓库管理、Issue和Pull Request处理、代码搜索等功能。通过封装GitHub API,实现对GitHub资源的程序化管理和自动化操作。
什么是MCP Server?
| 属性 | 详情 |
|---|---|
| Docker镜像 | https://hub.docker.com/repository/docker/mcp/github |
| 作者 | https://github.com/modelcontextprotocol |
| 代码仓库 | https://github.com/modelcontextprotocol/servers |
| Dockerfile | https://github.com/modelcontextprotocol/servers/blob/2025.4.24/src/github/Dockerfile |
| 镜像构建方 | Docker Inc. |
| Docker Scout健康评分 | !Docker Scout Health Score |
| 验证签名 | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/github --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub |
| 许可证 | MIT License |
| 工具名称 | 简短描述 |
|---|---|
add_issue_comment | 为现有Issue添加评论 |
create_branch | 在GitHub仓库中创建新分支 |
create_issue | 在GitHub仓库中创建新Issue |
create_or_update_file | 在GitHub仓库中创建或更新单个文件 |
create_pull_request | 在GitHub仓库中创建新Pull Request |
create_pull_request_review | 对Pull Request创建审核 |
create_repository | 在个人账号中创建新GitHub仓库 |
fork_repository | 将GitHub仓库Fork到个人账号或指定组织 |
get_file_contents | 获取GitHub仓库中文件或目录的内容 |
get_issue | 获取GitHub仓库中特定Issue的详情 |
get_pull_request | 获取特定Pull Request的详情 |
get_pull_request_comments | 获取Pull Request的审核评论 |
get_pull_request_files | 获取Pull Request中更改的文件列表 |
get_pull_request_reviews | 获取Pull Request的审核记录 |
get_pull_request_status | 获取Pull Request所有状态检查的综合状态 |
list_commits | 获取GitHub仓库中某个分支的提交列表 |
list_issues | 列出GitHub仓库中的Issue,支持筛选 |
list_pull_requests | 列出并筛选仓库的Pull Request |
merge_pull_request | 合并Pull Request |
push_files | 在单个提交中向GitHub仓库推送多个文件 |
search_code | 跨GitHub仓库搜索代码 |
search_issues | 跨GitHub仓库搜索Issue和Pull Request |
search_repositories | 搜索GitHub仓库 |
search_users | 搜索GitHub用户 |
update_issue | 更新GitHub仓库中现有的Issue |
update_pull_request_branch | 使用基础分支的最新更改更新Pull Request分支 |
add_issue_comment为现有Issue添加评论
| 参数 | 类型 | 描述 |
|---|---|---|
body | string | 评论内容 |
issue_number | number | Issue编号 |
owner | string | 仓库所有者(用户名或组织) |
repo | string | 仓库名称 |
create_branch在GitHub仓库中创建新分支
| 参数 | 类型 | 描述 |
|---|---|---|
branch | string | 新分支名称 |
owner | string | 仓库所有者(用户名或组织) |
repo | string | 仓库名称 |
from_branch | string 可选 | 可选:从中创建的源分支(默认为仓库的默认分支) |
create_issue在GitHub仓库中创建新Issue
| 参数 | 类型 | 描述 |
|---|---|---|
owner | string | 仓库所有者(用户名或组织) |
repo | string | 仓库名称 |
title | string | Issue标题 |
assignees | array 可选 | 可选:负责人列表 |
body | string 可选 | 可选:Issue内容 |
labels | array 可选 | 可选:标签列表 |
milestone | number 可选 | 可选:里程碑编号 |
create_or_update_file在GitHub仓库中创建或更新单个文件
| 参数 | 类型 | 描述 |
|---|---|---|
branch | string | 操作文件的分支 |
content | string | 文件内容 |
message | string | 提交消息 |
owner | string | 仓库所有者(用户名或组织) |
path | string | 文件创建/更新的路径 |
repo | string | 仓库名称 |
sha | string 可选 | 可选:被替换文件的SHA(更新现有文件时必需) |
create_pull_request在GitHub仓库中创建新Pull Request
| 参数 | 类型 | 描述 |
|---|---|---|
base | string | 接收更改的目标分支名称 |
head | string | 包含更改的源分支名称 |
owner | string | 仓库所有者(用户名或组织) |
repo | string | 仓库名称 |
title | string | Pull Request标题 |
body | string 可选 | 可选:Pull Request内容/描述 |
draft | boolean 可选 | 可选:是否创建为草稿Pull Request |
maintainer_can_modify | boolean 可选 | 可选:维护者是否可以修改此Pull Request |
create_pull_request_review对Pull Request创建审核
| 参数 | 类型 | 描述 |
|---|---|---|
body | string | 审核内容文本 |
event | string | 审核操作类型 |
owner | string | 仓库所有者(用户名或组织) |
pull_number | number | Pull Request编号 |
repo | string | 仓库名称 |
comments | array 可选 | 可选:作为审核一部分发布的评论(指定position或line,不可同时指定) |
commit_id | string 可选 | 可选:需要审核的提交SHA |
create_repository在个人账号中创建新GitHub仓库
| 参数 | 类型 | 描述 |
|---|---|---|
name | string | 仓库名称 |
autoInit | boolean 可选 | 可选:是否使用README.md初始化仓库 |
description | string 可选 | 可选:仓库描述 |
private | boolean 可选 | 可选:仓库是否设为私有 |
fork_repository将GitHub仓库Fork到个人账号或指定组织
| 参数 | 类型 | 描述 |
|---|---|---|
owner | string | 源仓库所有者(用户名或组织) |
repo | string | 源仓库名称 |
organization | string 可选 | 可选:Fork目标组织(默认为个人账号) |
get_file_contents获取GitHub仓库中文件或目录的内容
| 参数 | 类型 | 描述 |
|---|---|---|
owner | string | 仓库所有者(用户名或组织) |
path | string | 文件或目录路径 |
repo | string | 仓库名称 |
branch | string 可选 | 可选:获取内容的分支 |
get_issue获取GitHub仓库中特定Issue的详情
| 参数 | 类型 | 描述 |
|---|---|---|
issue_number | number | Issue编号 |
owner | string | 仓库所有者(用户名或组织) |
repo | string | 仓库名称 |
get_pull_request获取特定Pull Request的详情
| 参数 | 类型 | 描述 |
|---|---|---|
owner | string | 仓库所有者(用户名或组织) |
pull_number | number | Pull Request编号 |
repo | string | 仓库名称 |
get_pull_request_comments获取Pull Request的审核评论
| 参数 | 类型 | 描述 |
|---|---|---|
owner | string | 仓库所有者(用户名或组织) |
pull_number | number | Pull Request编号 |
repo | string | 仓库名称 |
get_pull_request_files获取Pull Request中更改的文件列表
| 参数 | 类型 | 描述 |
|---|---|---|
owner | string | 仓库所有者(用户名或组织) |
pull_number | number | Pull Request编号 |
repo | string | 仓库名称 |
get_pull_request_reviews获取Pull Request的审核记录
| 参数 | 类型 | 描述 |
|---|---|---|
owner | string | 仓库所有者(用户名或组织) |
pull_number | number | Pull Request编号 |
repo | string | 仓库名称 |
get_pull_request_status获取Pull Request所有状态检查的综合状态
| 参数 | 类型 | 描述 |
|---|---|---|
owner | string | 仓库所有者(用户名或组织) |
pull_number | number | Pull Request编号 |
repo | string | 仓库名称 |
list_commits获取GitHub仓库中某个分支的提交列表
| 参数 | 类型 | 描述 |
|---|---|---|
owner | string | 仓库所有者(用户名或组织) |
repo | string | 仓库名称 |
page | number 可选 | 可选:页码 |
perPage | number 可选 | 可选:每页条数 |
sha | string 可选 | 可选:分支SHA或分支名 |
list_issues列出GitHub仓库中的Issue,支持筛选
| 参数 | 类型 | 描述 |
|---|---|---|
owner | string | 仓库所有者(用户名或组织) |
repo | string | 仓库名称 |
direction | string 可选 | 可选:排序方向 |
labels | array 可选 | 可选:标签筛选列表 |
page | number 可选 | 可选:页码 |
per_page | number 可选 | 可选:每页条数 |
since | string 可选 | 可选:起始时间(ISO 8601格式) |
sort | string 可选 | 可选:排序字段 |
state | string 可选 | 可选:状态筛选(open/closed/all) |
list_pull_requests列出并筛选仓库的Pull Request
| 参数 | 类型 | 描述 |
|---|---|---|
owner | string | 仓库所有者(用户名或组织) |
repo | string | 仓库名称 |
base | string 可选 | 可选:按基础分支名称筛选 |
direction | string 可选 | 可选:排序方向 |
head | string 可选 | 可选:按源用户/组织和分支名称筛选 |
page | number 可选 | 可选:页码 |
per_page | number 可选 | 可选:每页条数(最大100) |
sort | string 可选 | 可选:排序字段 |
state | string 可选 | 可选:状态筛选(open/closed/merged/all) |
merge_pull_request合并Pull Request
| 参数 | 类型 | 描述 |
|---|---|---|
owner | string | 仓库所有者(用户名或组织) |
pull_number | number | Pull Request编号 |
repo | string | 仓库名称 |
commit_message | string 可选 | 可选:附加到自动提交消息的详情 |
commit_title | string 可选 | 可选:自动提交消息的标题 |
merge_method | string 可选 | 可选:合并方式(merge/squash/rebase) |
push_files在单个提交中向GitHub仓库推送多个文件
| 参数 | 类型 | 描述 |
|---|---|---|
branch | string | 推送目标分支(如'main'或'master') |
files | array | 推送文件数组(每个元素需包含path和content字段) |
message | string | 提交消息 |
owner | string | 仓库所有者(用户名或组织) |
repo | string | 仓库名称 |
search_code跨GitHub仓库搜索代码
| 参数 | 类型 | 描述 |
|---|---|---|
q | string | 搜索查询字符串(遵循GitHub搜索语法) |
order | string 可选 | 可选:排序顺序(asc/desc) |
page | number 可选 | 可选:页码 |
per_page | number 可选 | 可选:每页条数 |
search_issues跨GitHub仓库搜索Issue和Pull Request
| 参数 | 类型 | 描述 |
|---|---|---|
q | string | 搜索查询字符串(遵循GitHub搜索语法) |
order | string 可选 | 可选:排序顺序(asc/desc) |
page | number 可选 | 可选:页码 |
per_page | number 可选 | 可选:每页条数 |
sort | string 可选 | 可选:排序字段(comments/created/updated) |
search_repositories搜索GitHub仓库
| 参数 | 类型 | 描述 |
|---|---|---|
query | string | 搜索查询字符串(参见GitHub搜索语法) |
page | number 可选 | 可选:页码(默认:1) |
perPage | number 可选 | 可选:每页条数(默认:30,最大:100) |
search_users搜索GitHub用户
| 参数 | 类型 | 描述 |
|---|---|---|
q | string | 搜索查询字符串(遵循GitHub搜索语法) |
order | string 可选 | 可选:排序顺序(asc/desc) |
page | number 可选 | 可选:页码 |
per_page | number 可选 | 可选:每页条数 |
sort | string 可选 | 可选:排序字段(followers/repositories/joined) |
update_issue更新GitHub仓库中现有的Issue
| 参数 | 类型 | 描述 |
|---|---|---|
issue_number | number | Issue编号 |
owner | string |
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务