Momojie-S/dsh-workspace-mcp
DSH插件:按工作区加载MCP服务器(代理作用域)
Project Overview项目介绍
This is a native DeepSeek Harness plugin that manages MCP servers on a per-workspace basis. When you start a DSH session in a project directory, it automatically loads MCP server configurations from the project’s .dsh/mcp.servers.yml file, registers the MCP tools to the current agent’s scope, and cleans them up when the session ends. This ensures that MCP configurations from different projects do not interfere with each other, and all configuration fields align with the official DSH MCP client, supporting both transport modes. It registers all tools before the first model request, so tools are available from the start of the session.
The plugin includes several quality-of-life features that improve on the base DSH MCP functionality. It supports automatic exponential backoff reconnection for failed or disconnected MCP servers, and adds unique session expiration self-healing for streamable-http servers that the official client does not offer. It handles environment variable inheritance for stdio servers, automatically syncs tool lists when servers send change notifications, and reloads configurations immediately when the configuration file is edited. It also follows DSH rules for name conflicts, prioritizing the workspace-level version when names collide.
To use the plugin, you need a DSH version of 0.1.0-rc.6 or newer, and it has been tested up to version 0.1.5-rc.1. It is released under the open source MIT license, and can be installed directly via the dsh plugin command from the GitHub repository or from a pre-built tarball. After installation, you just need to restart DSH to activate the plugin. For development, you can compile the source code and manually add the compiled file to your DSH profile patch to test changes directly.
这是一款原生 DeepSeek Harness 插件,功能是按当前工作区会话自动加载和卸载 MCP 服务器。进入对应项目后,它会读取项目根目录下 .dsh/mcp.servers.yml 中的 MCP 服务配置,将工具注册到当前 agent 作用域,会话结束后自动回收,不同项目的 MCP 配置互不干扰,所有配置字段和官方 DSH MCP 客户端完全对齐,支持 stdio 和 streamable-http 两种传输方式。
该插件支持断线自动重连,移植了官方客户端的退避重连逻辑,启动失败或中途断线都会按指数退避重试,还支持 http 服务会话失效的自愈能力,这是官方客户端目前没有的功能。它还支持 stdio 服务的环境继承,会自动同步工具列表,监听配置文件修改,保存即重载,同时会按照 DSH 规则处理工作区级和全局 MCP 工具的命名冲突,工作区级工具优先级更高。
该插件要求 DSH 版本不低于 0.1.0-rc.6,目前已经验证兼容至 0.1.5-rc.1,采用 MIT 开源许可证。它作为 DSH 组合包插件发布,可以通过 dsh plugin 命令直接从 GitHub 安装,也可以通过打包好的 tarball 安装,安装完成后只需重启 DSH 即可生效,开发者也可以直接挂载源码进行开发测试。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-workspace-mcp(Momojie-S/dsh-workspace-mcp)
仓库:https://github.com/Momojie-S/dsh-workspace-mcp
本站详情页:https://www.yhbd.top/plugins/momojie-s-dsh-workspace-mcp/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-09-20 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add momojie-s-dsh-workspace-mcp-0.2.0.tgz
把 Momojie-S/dsh-workspace-mcp 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
@momojie-s/dsh-workspace-mcp
DSH 插件:按 workspace(session cwd) 自动加载/卸载 MCP server——每个项目自己的 .dsh/mcp.servers.yml 只在自己的会话生效,MCP 工具注册到 agent scope,随 agent 生灭自动回收,不同项目的 MCP 互不干扰。
环境要求
- DSH
>= 0.1.0-rc.6(已验证至0.1.5-rc.1)
用法
项目根放 .dsh/mcp.servers.yml:
servers:
my-server:
transport: stdio
command: npx
args: ["-y", "some-mcp-server@latest"]
env: {}
remote:
transport: streamable-http
url: https://example.com/mcp
headers:
Authorization: "Bearer <token>"
字段与 @deepseek-ai/dsh-mcp-client 对齐(transport / command / args / env / url / headers / toolCallTimeoutMs / reconnect)。
- agent 创建即连接注册(
agent/created),首个模型请求就含这些工具;headless "create 后立刻发消息" 的竞速场景第 1 步可能没有,第 2 步必有 - 断线自动重连(移植官方 dsh-mcp-client 的 supervisor):启动失败与中途断线均按指数退避重连并重新注册工具;重连期间旧工具保持注册(调用会失败),server 恢复后自动换新。stdio = 重新 spawn,http = 重新握手
- 会话失效自愈(≥0.2.1,官方 client 尚无此能力):streamable-http server 重启/会话驱逐后的
Session not found类错误自动判定断线并换代重连,无需手动"强制重连" - stdio 环境继承(≥0.3.0,与全局 MCP 一致):子进程拿到 scrubbed 父环境(剥
KEY|PASSWORD|SECRET|TOKEN命中名与DSH_*前缀名)+ ymlenv覆盖层——需要父环境变量(如PYTHONPATH)的 server 直接工作;ymlenv是覆盖层不是完整环境 - server 声明受支持的
outputSchema时进入structuredContent输出契约;非法工具列表 / 注册名冲突整代拒绝/回滚(≥0.3.0,官方对齐) - server 发
toolListChanged通知时自动重同步工具列表 - 改配置文件由 chokidar 监听,保存即重载;无该文件的目录不加载任何 MCP
headless/tui profile 临时挂载
这两个 profile 默认没挂 workspace-mcp,需要时用 --patch 临时挂 file:/// 行指向其 lib(纯 host 半部插件可临时这样挂,带浏览器半部的插件不行):
dsh --profile headless --patch <(echo "- insert:
- id: workspace-mcp
name: file:///D:/code/workspace/deepseek-harness-101/plugins/dsh-workspace-mcp/lib/index.js") "任务…"
与全局 MCP 的同名遮蔽(实测结论)
两边工具名都是 mcp__<serverName>__<tool>,冲突语义来自 DSH 工具注册表——agent 作用域遮蔽全局(per-tool,按名字逐个遮蔽):
| 场景 | 行为 |
|---|---|
| serverName 不同 | 共存,两组工具模型都可见(正常用法) |
| 同 serverName(工具名撞车) | 项目级赢:模型看到并调用的都是项目版(web 从第 1 步起;竞速输了的场景第 1 步可能暂用全局版,第 2 步起项目版)。全局版对没配此 server 的其它 workspace 不受影响 |
| 全局 patch 里两条同 serverName | 后者整代注册回滚,日志报 already registered,该 server 一个工具都没有 |
| 同一个 yml 里重复 server 键 | YAML 后键覆盖前键 |
同名遮蔽是刻意覆盖的正规姿势(如把全局 server 指向本地 dev 实例调试);无意撞名就改 serverName。若两边工具列表不完全一致,只有重名的那部分被遮蔽,其余各自可见。
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
vibeinging/dsh-desktop
chokwinlee/deepseek-harness-desktop
ZSeven-W/dsh-android
robiteame/dsh-session-tree-extension
baihejiangnan/dsh-session-context-menu
chromoany/dsh-notify-me
wallpap/dsh-compact-activity
HuanLinOTO/dsh-plugin-merge-tool-calls