dsh-mcp-manager
dsh-mcp-manager

适用于 DeepSeek Harness (DSH) 的持久化 MCP 服务器管理器——一个组合型加载器插件(非动态会话插件),因此能在 DSH 重启和升级后继续存活。
基于 DSH 插件开发标准构建(参见官方文档:第一个插件, 开发一个工具):
对象形式的 Cordis 插件 (
export default { name, inject, apply })在
inject中声明的必需服务——框架保证它们在apply运行前已就绪,并在某个服务消失时重新加载插件(这正是插件在 DSH 升级后仍能存活的原因)通过
ctx.tools.register(defineTool(...))将代理端能力暴露为已注册的模型工具:mcp_manager_list,mcp_manager_set_enabled,mcp_manager_restart,mcp_manager_add通过
webServer精确路由 (POST /dsh-mcp-manager/api) 暴露 UI 端能力,由客户端部分消费
功能特点:
设置 → MCP 管理 页面(由客户端部分添加)
主机部分管理真实补丁文件中的
@deepseek-ai/dsh-mcp-client行:项目级 →
~/.dsh/profiles/<profile>/cordis.patch.yml全局 →
~/.dsh/cordis.patch.yml添加/编辑/启用/禁用/重启/删除,实时工具计数健康状态,JSON 导出/导入,每个文件的写入锁
工作原理
组成部分 | 文件 | 角色 |
主机插件源码 |
| TypeScript 源码(文档中描述的插件结构);使用 |
主机插件(编译后) |
| Cordis 对象形式插件:补丁文件 CRUD + 4 个模型工具 + |
客户端包 |
| 浏览器模块:注册设置页面;通过 |
加载器行 | 添加到配置文件的 | 组合主机入口;client-modules 服务扫描已启用的条目并提供客户端包 |
加载器条目是两部分唯一的组合点——无需修改任何已发布的 DSH 包。该包本身是平台无关的(纯 JS;路径分隔符在运行时检测),因此可在 Windows、macOS 和 Linux 上运行。构建 (npm run build) 需要开发依赖 (typescript, @deepseek-ai/cordis, @deepseek-ai/dsh-tools, @types/node);已发布/安装的包不需要它们。
Related MCP server: Deepseek MCP Server
安装(任何平台)
最快捷——单条命令,通过 npm(需要 Node.js >= 18):
# Option A — one-shot with npx, nothing to install
npx -y @xxxyz/dsh-mcp-manager
# Option B — global npm install, then run the command any time
npm i -g @xxxyz/dsh-mcp-manager
dsh-mcp-manager # install the plugin
dsh-mcp-manager-uninstall # uninstall the plugin
npm i -g @xxxyz/dsh-mcp-manager@latest # upgrade两种选项都支持所有标志传递:npx -y @xxxyz/dsh-mcp-manager --dsh-home /path/.dsh --profile web --repair --port 3080。
npm 包名:
@xxxyz/dsh-mcp-manager(npm 上裸名dsh-mcp-manager已被不相关的包占用)。部署后的插件名仍是dsh-mcp-manager——npm/npx 仅作为交付渠道;安装程序将文件复制到以下相同的固定位置。
无需 npm 的替代方案——直接从 GitHub 获取:
npx -y github:xxxyz/DeepSeekHarness-MCP-Manager替代方案——从源码检出运行安装脚本(所有安装程序共享一个跨平台逻辑文件 install.mjs)。安装步骤:
将包复制到
<dshHome>/local-packages/dsh-mcp-manager(真正的源文件,放在node_modules外部,因此 DSH 升级永远不会触及它)将其复制到
<dshHome>/profiles/node_modules/dsh-mcp-manager(故意使用普通复制而非符号链接——否则 Node ESM 会解析插件的真实路径,导致找不到@deepseek-ai/dsh-tools)将加载器行追加到
profiles/<profile>/cordis.patch.yml(幂等性;保持补丁为有效的顶层数组)
Windows (PowerShell):
.\dsh-mcp-manager\install.ps1 # default: ~/.dsh, web profile
# or: .\install.ps1 -DshHome D:\path\.dsh -Profile webmacOS / Linux:
./dsh-mcp-manager/install.sh # default: ~/.dsh, web profile
# or: ./install.sh --dsh-home /path/.dsh --profile web任何平台(直接):
node dsh-mcp-manager/install.mjs [--dsh-home <path>] [--profile <name>] [--port <n>] [--repair] [--skip-patch]然后重启 DSH 并打开设置 → MCP 管理。四个 mcp_manager_* 工具在重启后即可被模型调用。
卸载(任何方法):
dsh-mcp-manager-uninstall # if installed via npm -g
# or: .\dsh-mcp-manager\uninstall.ps1 | ./uninstall.sh | node uninstall.mjs [--dsh-home <path>] [--profile <name>]然后重启 DSH。卸载会删除部署的副本、local-packages 中的真实源文件以及加载器行。
DSH 升级后:--repair
DSH 升级(或 HMR 状态损坏)可能导致插件的主机部分未加载,而文件仍保留。一条命令即可修复——从记录源重新复制包,增加加载器行的 config.version 以强制 HMR 重新应用,然后轮询 API 直到其响应:
node dsh-mcp-manager/install.mjs --repair # default ~/.dsh, web, port 3080
node dsh-mcp-manager/install.mjs --repair --port 3080
# PowerShell: .\install.ps1 -Repair -Port 3080 bash: ./install.sh --repair --port 3080--repair 仅在 POST /dsh-mcp-manager/api 返回 {ok:true} 时返回成功。如果 30 秒后 API 仍未响应,请重启一次 DSH(加载器总是在启动时重新导入新的包)。
API 参考
所有操作均为 POST /dsh-mcp-manager/api,请求体为 {"op": "<op>", "args": {...}},同源。
op | args | result | |
|
|
| |
| `{serverName, transport, url | command, args?, headers?, env?, level, enabled?}` |
|
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
|
模型工具
通过 ctx.tools.register(defineTool(...))(标准 @deepseek-ai/dsh-tools)在主机上注册:
工具 | 描述 | |
| 列出所有已配置的 MCP 服务器(层级、启用状态、实时加载器状态、工具数量) | |
| 启用/禁用某个服务器(id, level, enabled) | |
| 重启某个服务器(id, level) | |
| 添加一个服务器(serverName, transport, url | command, …, level) |
注意事项 / 限制
HTTP 路由在本地 Web 服务器上未认证——适用于本地单用户机器;请不要公开暴露 DSH 的 Web 端口。
被管理的行带有
# dsh-mcp-manager:server:<id>标记;加载器行是一个insert块,添加了id: mcp-manager, name: dsh-mcp-manager——DSH 的补丁方言将普通的- id:行视为对已有条目的覆盖(如果不存在则静默跳过),因此添加插件需要使用insert形式。如果运行的网页是在安装之前加载的,则需要刷新页面或重启 DSH 才能加载客户端模块(启动图在页面加载时构建)。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables integration of DeepSeek's language models with MCP-compatible applications, offering features like chat completion, custom model selection, and parameter control for enhancing language-based interactions.62,198351MIT
- AlicenseAqualityAmaintenanceMCP server for DeepSeek AI models (Chat + Reasoner). Supports multi-turn sessions, model fallback with circuit breaker, function calling, thinking mode, JSON output, multimodal input, and cost tracking.32,81017MIT
- FlicenseAqualityCmaintenanceA robust MCP server with tools to search, install, configure, repair, and uninstall MCP servers, automating setup and maintenance across multiple AI and developer tools.417
- Alicense-qualityCmaintenanceEnables LLMs to manage MCP server configurations, including listing, enabling, disabling, and version control.10MIT
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
A MCP server built for developers enabling Git based project management with project and personal…
Cloud-hosted MCP server for durable AI memory
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/xxxyz/DeepSeekHarness-MCP-Manager'
If you have feedback or need assistance with the MCP directory API, please join our Discord server