dsh-github-mcp
by GitRuozhi
DSH-GitHub 桥接:经官方 GitHub MCP server 让 DSH 直连 GitHub,并修复官方桥接丢失文件内容的问题
DSH-GitHub bridge: direct GitHub access for DSH via the official GitHub MCP server, plus a fix for the official bridge's dropped file content.
安装
dsh plugin --profile web add github:GitRuozhi/dsh-github-mcpGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
DSH-GitHub 桥接器,将 GitHub 官方 MCP 服务桥接成 DSH 原生工具,同时修复了 DSH 官方丢弃文件原文的问题。
安装后,Agent 可以使用 mcp__github__* 工具族和 github_file_read 工具直接访问 GitHub 和读取文件,不再需要通过本地 Git 或 gh 工具中转。
安装
dsh plugin --profile web add github:GitRuozhi/dsh-github-mcp
安装后需配置 GITHUB_TOKEN 并重启 dsh web。本机 gh 已登录时,可直接让 DSH 帮你配置。
特点
| ✅ 官方 | 直连 GitHub 官方 github-mcp-server |
| ✅ 原生 MCP | 走 MCP 协议直连,不包装 gh、不手写 REST |
| ✅ 零本地依赖 | 使用 GitHub 官方托管端点 https://api.githubcopilot.com/mcp/ |
| ✅ 能读文件正文 | github_file_read 修复了官方桥接丢弃文件原文的问题 |
工具
安装后新增两类工具:
github_file_read —— 读取文件正文(解码为 UTF-8 文本)或列出目录,私有仓库也能读(需 GITHUB_TOKEN)。
mcp__github__*(44 个,来自 GitHub 官方 MCP server)
- 搜索:
search_repositories搜仓库、search_code搜代码、search_issues搜 issue、search_pull_requests搜 PR、search_commits搜 commit、search_users搜用户 - 仓库:
create_repository建仓库、fork_repositoryfork、list_repository_collaborators协作者、list_branches/create_branch列/建分支、list_tags/get_tag列/读 tag、list_commits/get_commit列/读 commit - 文件:
get_file_contents读文件/目录、create_or_update_file写文件、delete_file删文件、push_files批量推文件 - Release:
list_releases列 release、get_latest_release最新 release、get_release_by_tag按 tag 读 release - Issue:
list_issues列 issue、issue_read读、issue_write建/改、sub_issue_write子 issue、add_issue_comment评论、get_label标签、list_issue_types/list_issue_fields类型/字段、get_teams/get_team_members团队/成员 - Pull Request:
list_pull_requests列 PR、pull_request_read读、create_pull_request建、update_pull_request改、update_pull_request_branch更新分支、merge_pull_request合并、pull_request_review_write审查、add_comment_to_pending_review待审评论、add_reply_to_pull_request_comment回复评论、request_copilot_review请求 Copilot 审查 - 其它:
get_me当前用户信息、run_secret_scanning密钥扫描
模型看到的名字都带
mcp__github__前缀。
极简预设
这个插件把工具注册在全局,所以所有预设都会继承 GitHub 工具,包括极简预设。如果您希望某个预设不采用此插件,可以在每次系统提示组装时把它们过滤掉。请注意,DSH 原生极简预设 minimal 无法屏蔽全局插件,您可以新建一个自定义极简预设来实现屏蔽。
请在
system-prompt/assemble里过滤,而不要在apply时对ctx.tools.schemas()打快照:本插件是异步注册工具的(MCP 发现 +ctx.effect注册),一次性快照在apply时是空的,屏蔽不会生效。组装时过滤与注册顺序无关——请求发生前已注册的工具都会被过滤掉。
// restrict-github.js
const name = 'restrict-github';
const inject = ['tools'];
function apply(ctx) {
ctx.on('system-prompt/assemble', async (_assembly, _context, next) => {
const assembled = await next();
try {
const tools = assembled && Array.isArray(assembled.tools) ? assembled.tools : [];
const filtered = tools.filter((tool) => {
const toolName = tool && typeof tool.name === 'string' ? tool.name : '';
return !(toolName.startsWith('mcp__github__') || toolName === 'github_file_read');
});
if (filtered.length === tools.length) return assembled;
return { ...assembled, tools: filtered };
} catch (error) {
// 过滤器出错绝不能把会话搞崩:保留全部工具。
return assembled;
}
});
}
export { apply, inject, name };
# 在该预设的 agent.cordis.yml 里
- id: restrict-github
name: ./restrict-github.js
原始 README: https://github.com/GitRuozhi/dsh-github-mcp/blob/main/README.zh.md ↗
同类插件
查看全部 →
k8e
k8e.sh — 开源 Agentic AI 沙箱矩阵

hol-guard
开源AI代理防病毒:运行时拦截风险工具、秘密访问、提示注入、恶意软件包、MCP服务器、插件和技能。

anolisa
ANOLISA(Agentic Nexus Operating Layer & Interface System Architecture):具备运行时、安全性、可观测性和 Tokenless 响应压缩能力的 Agentic OS,可降低 Token 使用量与成本。

mobius
首个自我演进的开源 Agent OS:连接你的团队、AI agent、设备与算力

deepseek-harness-desktop
DeepSeek Harness Tauri 桌面版 | Only 5mb installer, zero environment setup. Windows / macOS / Linux.

open-managed-agents
开源Claude管理代理API实现和自托管Claude标签式代理运行时。即插即用;在Cloudflare Workers/Durable Objects或Node.js上运行。Apache 2.0。