dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
把 GitHub 官方远程 MCP server 封装为 DSH 插件:PAT 存入 DSH 凭据中心(.credentials.yaml),提供 github_set_token / github_token_status 模型工具,GitHub 工具以 mcp__github__* 形式可用。
把 GitHub MCP 整体封装成一个 DSH 插件:接入 GitHub 官方远程 MCP Server,token 存到 DSH 凭据中心(
.credentials.yaml),可通过模型工具输入;GitHub 工具以mcp__github__*形式可用。附带可选面板插件dsh-github-mcp-hint(需额外安装,见下文)。
@deepseek-ai/dsh-mcp-client 连接 https://api.githubcopilot.com/mcp/,GitHub 工具以 mcp__github__* 名称出现(search_repositories、list_pull_requests、create_pull_request、push_files、get_file_contents、merge_pull_request、add_issue_comment …共 40+ 个)。.credentials.yaml(refs.GITHUB_TOKEN),不写入源码、不进日志。github_token_status — 查看 token 是否已配置、来源、是否可写。github_set_token — 输入/更新 token(写入凭据中心并刷新当前环境)。dsh-github-mcp-hint(可选,需额外安装):设置 → 插件 → GitHub MCP 的示例 + 公开仓库统计 UI。# 1. 安装主插件
dsh plugin --profile web add dsh-github-mcp # npm 推荐
# —— 或 ——
dsh plugin --profile web add github:ZIye1208/dsh-github-mcp # 从 GitHub 安装
# 若要「设置 → 插件 → GitHub MCP」面板,需再单独安装面板插件:
dsh plugin --profile web add dsh-github-mcp-hint
# 2. 设置 token(对话里说即可)
# “帮我把 GitHub token 设为 ghp_xxx”
# 3. 重启 DSH,然后问
# “我的 GitHub token 配好了吗” (github_token_status)
# “看看我的仓库有多少星多少下载”(走 mcp__github__* / 面板)
dsh plugin --profile web add dsh-github-mcp
安装会把 dsh-github-mcp-hint 一并装进 node_modules(作为依赖),但 DSH 只把「顶层依赖」加入 profile 的 bundles 层,因此面板插件不会自动启用。若需要「设置 → 插件 → GitHub MCP」面板,请额外执行:
dsh plugin --profile web add dsh-github-mcp-hint
本包已发布到 npmjs registry:
dsh plugin --profile web add dsh-github-mcp。
dsh plugin --profile web add github:ZIye1208/dsh-github-mcp
# 在 profile 的 package.json 用 link 指向本地路径,并加入 dsh.profile.bundles,然后重启 DSH
@deepseek-ai/dsh-mcp-client,属 DSH 核心)。repo、read:org、read:packages(用于 MCP 读写仓库/PR/issue)。在对话里说:
帮我把 GitHub token 设为 ghp_xxxxxxxx
agent 调用 github_set_token,写入 ~/.dsh/.credentials.yaml 的 refs.GITHUB_TOKEN,并更新当前环境变量。
编辑 ~/.dsh/.credentials.yaml,在 refs: 下加一行:
version: 1
refs:
GITHUB_TOKEN: ghp_xxxxxxxx
# records:
# ...
保存后,下一次 DSH 启动时插件会自动把它桥上到 process.env.GITHUB_TOKEN。
在启动 shell 设 GITHUB_TOKEN=ghp_xxx 后启动 DSH。注意:一旦环境里已有 GITHUB_TOKEN,它优先且只读,github_set_token 写入凭据中心会被拒绝——需先 unset GITHUB_TOKEN 再用方式 A/B。
⚠️ 修改 token 后需重启 DSH 才生效:
mcp-client在启动时读取 token(静态 header),运行中不会重连。
github_token_status。mcp__github__*。示例:
dsh-github-mcp-hint 提供,随机 4/30 条示例、公开仓库统计)。dsh plugin --profile web remove dsh-github-mcp
dsh-github-mcp 自动捆绑安装了面板插件 dsh-github-mcp-hint(作为依赖)。可独立卸载:
dsh.profile.bundles 移除 dsh-github-mcp-hint;dsh plugin --profile web remove dsh-github-mcp-hint。卸载面板后,github_token_status / github_set_token 及所有 mcp__github__* 仍可用。
在 profile 的 cordis.patch.yml 给面板行加:
- id: dsh-github-mcp-hint
disabled: true
用户输入 token ──(github_set_token)──► DS H 凭据中心 .credentials.yaml (refs.GITHUB_TOKEN)
│
▼ 启动时插件桥接
process.env.GITHUB_TOKEN
│
▼ mcp-client 启动读取
Authorization: Bearer <token> ──► https://api.githubcopilot.com/mcp/
│
▼
注册 mcp__github__* 工具(模型可调)
dsh-github-mcp = GitHub MCP 连接 + token 凭据中心。dsh-github-mcp-hint = 面板 UI(独立仓库,可卸载)。.credentials.yaml)不会自动注入 process.env,所以插件在启动时做一次「凭据中心 → 环境变量」的桥接,让 mcp-client 能读到。mcp__github__* 没出现:多半是 token 未配置或未重启。先 github_token_status,再重启 DSH。github_set_token 被拒:启动环境里已有 GITHUB_TOKEN(只读)。先 unset GITHUB_TOKEN,再用工具保存到凭据中心。serverName "github" already in use:你在 profile 里手动加过 mcp-github 行。删掉那行,交给本插件的 cordis.patch.yml(含 mcp-github 行)管理。dsh-github-mcp 但没有「GitHub MCP」面板:DSH 只把顶层依赖加入 bundles 层,dsh-github-mcp-hint 作为依赖不会自动启用。请再执行 dsh plugin --profile web add dsh-github-mcp-hint(或把它加进 profile 的 dsh.profile.bundles),然后重启 DSH。| 仓库 | 作用 |
|---|---|
ZIye1208/dsh-github-mcp | GitHub MCP 连接 + token 凭据中心(本插件) |
ZIye1208/dsh-github-mcp-hint | 面板 UI(独立、可卸载) |