给 DSH 官方 MCP 客户端加一个只读管理面板:/mcp 命令看服务器状态与健康诊断,Settings 里通过追加式配置文件片段增删改 MCP 服务器,并能试跑 mcp__* 工具。
- 语言
- TypeScript
- License
- Apache-2.0
- 分支
- main
安装
$ dsh plugin --profile web add dsh-mcp-panel在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程
对话式安装
帮我安装 DeepSeek Harness 插件 PerryLink/dsh-mcp-panel:先查看仓库 https://github.com/PerryLink/dsh-mcp-panel 确认安全性,然后执行安装命令并验证插件加载成功。
把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。
一句话定位
给 DSH 官方 MCP 客户端叠加一层管理面板:在 /mcp 命令和 Settings → Plugins → MCP 标签里查看每个 MCP 服务器的连接状态、工具清单、错误诊断,支持以追加方式生成服务器增删改片段、并能试跑任意 mcp__* 工具,全程只读或审批通过后落盘。
核心能力
/mcp命令:列出每个 MCP 服务器一行——传输方式、目标、工具数、连接状态、最近一次错误、重连次数;输出是模型可读 + 会话日志可回放,支持英 / 中 / 西 / 葡 / 印地五种语言。/mcp <server> tools | health | call | disable | enable | probe子命令:列出模型可见工具名、按错误模式给出修复建议、通过官方工具流水线试跑一次、生成启停片段、发起后台探针。- Settings → Plugins → MCP 标签:服务器增删改表单(stdio / streamable-http 两种形态),工具试跑控制台,连接状态卡片 + 健康诊断 + 探针结果,全部走
mcpPanel远程通道拉数据。 - 追加式配置写入:表单提交后渲染成
insert/set/set disabled: true片段并加入cordis.patch.yml末尾;写入前自动备份当前文件,按backupCount保留最新若干份,可一键复制到剪贴板或经审批落盘。 - Streamable HTTP 与 stdio 探针:在控制台或
/mcp <server> probe触发后台任务,stdio 行通过node:child_process.spawn启动配置的command/args完成一次 MCPinitialize握手,结果只回控制台、不会进模型上下文。 - 诚实状态呈现:观测不到的字段一律显示
unknown/-1/—并标记statusSource: 'derived';从不伪造连接状态,不注入 prompt 片段,配置里的 header 值永远不出现在快照里。 - 展示前脱敏:URL query 凭据、userinfo 密码、header 值、Bearer token、JWT 在显示前一律替换成
***;stdio 探针用与官方桥相同的scrubbedParentEnv基础环境,DSH_*与凭据形状的环境变量不会隐式注入子进程。
技术实现
- 语言: TypeScript(ESM,
type: module),浏览器端使用 React + 内置 Typert Remote - 关键依赖:
@deepseek-ai/cordis(宿主框架)、@deepseek-ai/dsh-typert-protocol(host ↔ client 双向远程通道)、@deepseek-ai/dsh-subprocess(stdio 探针的凭据过滤环境)、zodv4(wire codec 校验)+@deepseek-ai/schemastery(loader 配置 schema) - 架构模式: 双面 Cordis 函数插件,host 端
src/index.ts通过apply(ctx, config)挂McpPanelService(Typert Remote 服务,命名空间mcpPanel)+/mcp命令 + 可选mcp_probe工具 + 后台任务控制器;client 端src/client/index.ts通过ctx.remote.$mount(MCP_PANEL_REMOTE)注册远程调用客户端,再向settings.plugins.tab槽位注入 MCP 标签 - 入口文件: host 端
src/index.ts(插件导出 + 挂载),client 端src/client/index.ts(浏览器挂载);wire 词表与 invocation descriptor 由src/wire.ts单源提供,host manifestsrc/typert.host.ts与 clientsrc/client/remote.ts共享
适用场景
你已经在用官方 MCP 客户端连了不少外部服务,每次排查"为什么这个工具今天不响应"都要去翻日志;装上之后直接看 Settings 标签或跑 /mcp <server> health,状态、重连次数、错误模式一目了然;想临时增删服务器也可以走表单而不是手改 YAML,改错了自动有备份可回滚。
前置依赖与兼容性
| 依赖 | 最低版本 | 说明 |
|---|---|---|
| DeepSeek Harness | 0.1.0-rc.8 | 四个 dsh-* peerDependencies 范围 >=0.1.0-rc.8 <0.2.0,dshWorkshop.compatibility.dshVersions 仅列出 0.1.0-rc.8 |
| Node.js | ^22.19.0 || >=24.0.0 | package.json#engines.node 声明 |
| Cordis | ^4.0.1 | peerDependencies |
| Cordis Loader | ^1.0.2 | peerDependencies |
| Schemastery | ^3.18.0 | peerDependencies |
| 平台 | 跨平台 | host 端纯 JS;stdio 探针仅用 node:child_process.spawn;浏览器标签仅在 web profile 注册 |
| 原生模块 | 无 | 无 os/cpu 限制,无 node-gyp/node-pty 等原生依赖 |
安装方式
dsh plugin --profile web add github:PerryLink/dsh-mcp-panel
配置项
| 配置 | 类型 | 说明 | 默认值 |
|---|---|---|---|
probeEnabled | boolean | 是否注册 mcp_probe 后台任务工具;关闭后只剩面板内部探针按钮可用 | true |
probeTimeoutMs | number | 每次探针的超时时间(毫秒) | 10000 |
maxProbes | number | 面板保留展示的最近探针记录条数 | 10 |
refreshIntervalMs | number | 面板建议刷新间隔(毫秒),0 表示按需刷新 | 0 |
outputLanguage | en | zh | es | pt | hi | /mcp 命令的输出语言(不影响浏览器面板) | en |
passiveProbeEnabled | boolean | 是否对 streamable-http 服务器做周期性被动探针 | false |
passiveProbeIntervalMs | number | 被动探针周期(毫秒) | 60000 |
trialEnabled | boolean | 工具试跑控制台总开关(关闭后 Settings 标签和 /mcp call 都不能试跑) | true |
trialTimeoutMs | number | 单次试跑面板侧超时(毫秒) | 120000 |
trialMaxResultChars | number | 试跑结果 JSON 投影的最大字符数,超出会截断并标记 | 60000 |
writeEnabled | boolean | 配置写入总开关;关闭后所有写请求都被拒绝,但片段仍可复制到剪贴板 | true |
backupCount | number | 每次写之前保留的 cordis.patch.yml 时间戳备份数量 | 5 |
常见问题
Q: 这个插件和我手写的 cordis.yml 有什么关系?
A: 不冲突。官方 MCP 客户端是"桥"(每台服务器在 cordis.yml / cordis.patch.yml 里写一行),这个插件是"控制台",只读取桥的状态、要写也只是追加新片段并自动备份,不会动你已写好的行。
Q: 它会改动我现有的 MCP 服务器配置吗?
A: 不会。任何写入都是追加到 cordis.patch.yml 的尾部、并且先复制原文件到带时间戳的备份;卸载或回滚时只需删掉追加的那块,配置保持原状。
Q: 我能让它完全只读吗?
A: 可以。把配置项 writeEnabled 设为 false,所有写入请求都会被拒绝(但仍然可以在控制台生成片段并复制到剪贴板,手动粘贴)。
Q: /mcp 显示的连接状态为什么有时是 unknown?
A: 因为官方 MCP 客户端目前没有把连接状态外发为可观察事件,控制台无法猜测——这是诚实默认值,只有上游真的发来状态事件后才会变成 connecting / connected / waiting / exhausted / disposed 之一。
Q: 在 Settings 里试跑工具会绕过审批吗?
A: 不会。试跑走的就是官方 ctx.tools.execute() 流水线,权限策略、审批请求、护栏全部照常生效;如果当前会话有打开的回合,审批会路由到 Web 的审批通道。
Q: 探针(probe)会不会暴露我的 API Key?
A: 不会。stdio 探针在子进程里只完成一次 MCP initialize 握手,不会发送你的密钥;任何 URL、错误文本、JWT、Bearer token 在显示前都会被 sanitize.ts 模块统一替换成 ***;你配置的 header 值根本不会出现在快照里。
Q: /mcp 输出为什么有五种语言?Web 面板怎么只有两种?
A: /mcp 命令有独立的 outputLanguage 配置(en/zh/es/pt/hi),方便命令行和会话日志消费;浏览器面板的语言跟随应用 UI 语言(en/zh),两者是两套词库。
Q: 怎么彻底卸载?
A: 从 cordis.patch.yml 删掉 mcp-panel 行(Web 配置热加载,无需重启),从 node_modules 移除 dsh-mcp-panel 包,再用 dsh --dump-config 确认没有 mcp-panel 行残留。
上手难度
入门 — 仅一行安装命令,控制台开箱即用、命令不需要额外学习;如果想关掉写入或调探针阈值,配置项也都是 Schemastery schema,所有边界都在加载时校验失败直接报错。
已知问题与限制
- Resources 和 Prompts 当前不可用:官方 MCP 客户端目前只桥接 Tools;控制台会显示这两项"pending upstream support",直到上游暴露
mcpCatalog服务(提案见docs/upstream-proposal.md)。 - 进程退出码和 stderr 尾部缺失:stdio 探针目前只能给出握手是否成功 / 服务端名称版本;子进程的 exitCode 和 stderrTail 是向上游提议的字段,等上游真的发来后控制台才会填入。
- 未观测字段保持 unknown:连接状态、重连次数、最近错误时间戳在没收到上游事件之前一律显示
unknown/-1/—并标记statusSource: 'derived'——控制台从不据工具注册表反推连接状态,避免误报"还活着"。 writeEnabled: false会拦截所有写:包括任何审批流程也无法落盘,但仍然能渲染片段用于手动复制粘贴。
dsh-mcp-panel
The MCP management console for the official DeepSeek Harness MCP client — add, edit, remove, and trial-call MCP servers from a settings page, with honest status, health diagnostics, and safe, reversible profile writes.
Official client = bridge, this plugin = console: read status through the mcp/status seam, write only append-only, approval-gated profile patches.
Compatibility
| Surface | Status |
|---|---|
| Harness | DeepSeek Harness 0.1.0-rc.8–0.2.0 |
| Node | ^22.19.0 || >=24.0.0 |
| Platforms | Web GUI (dual-face: host + browser) |
| Model | Any (the panel is read-only; only /mcp output is model-readable) |
What you get
dsh-mcp-panel is the experience layer on top of the official MCP client: a read-only runtime view plus safe, reversible profile writes.
/mcpcommand — one row per server: transport, target, tool count, connection status (from the upstream seam;unknownwhen unobserved), last error, reconnect count — model-readable, session-log reconstructable, five output languages./mcp <server> tools— model-visiblemcp__*tool names and descriptions./mcp <server> health— derived self-heal suggestions (ENOENT → missing dependency, ECONNREFUSED, timeouts, 401/403/404, DNS, rate limit, reconnect exhaustion…); exit code / stderr tail honestly labeled pending upstream support until the client exposes them./mcp <server> call <tool> [json]— trial-call through the official tool pipeline (ctx.tools.execute()); pre-execute permission policy, approval, guards, and post-execute all apply.- Settings → Plugins → MCP tab — status cards with badges, diagnostics, and probes, plus the server CRUD and the tool trial console.
- Server CRUD — add/edit/remove forms →
insert/set/set disabledfragments → clipboard copy or approval-gated write with automatic backups. - Tool trial console — server →
mcp__*tool → JSON args → canonical JSON result + rendered content; capped bytrialMaxResultChars; panel-only, never model context.
Architecture: official client = bridge, this plugin = console
@deepseek-ai/dsh-mcp-client is the only bridge: one plugin instance per MCP server, configured as a hand-written cordis.yml row, connecting the transport, syncing tools, and registering mcp__<server>__<tool> names. This plugin never replaces it — it is the experience layer on top:
┌────────────────────────────────────────────┐
profile │ cordis.yml / cordis.patch.yml │
composition │ - id: mcp-github │
(one row per │ name: '@deepseek-ai/dsh-mcp-client' │
server, hand- │ config: { serverName, transport, … } │
written) │ - id: mcp-panel │
│ name: dsh-mcp-panel ◄── this plugin │
└───────────────┬────────────────────────────┘
│
┌───────────────────────────┴───────────────────────────┐
│ │
┌────▼──────────────┐ ┌───────────────────────────┐ │
│ @deepseek-ai/dsh- │ │ dsh-mcp-panel (console) │ │
│ mcp-client │ │ │ │
│ • transport │ │ • /mcp command │ │
│ • tool sync │ │ • Settings → Plugins → │ │
│ • mcp__* tools │◄──────►│ MCP tab: CRUD, trial │ │
│ • mcp/status seam │ status │ • health diagnostics │ │
└───────────────────┘ │ • probes, capabilities │ │
└───────────────────────────┘ │
The console reads the client through its shipped mcp/status observability seam (event + mcpStatus query service), the tool registry, and the loader; it writes only the profile's patch layer — append-only, approval-gated, always backed up. Transport, OAuth, and protocol stay untouched.
Console vs. hand-written cordis.yml
| Hand-written cordis.yml | dsh-mcp-panel console | |
|---|---|---|
| Add a server | Edit YAML, mind indent/quoting | Form → patch fragment → copy or write (approval + auto backup) |
| Edit a server | Edit YAML, restart/hot-reload | Form pre-filled from the live row; unchanged secrets keep their raw values host-side |
| Remove a server | Delete the row | set disabled: true operation (the patch vocabulary has no remove) — re-enableable anytime |
| See status | Read logs | Badges + reconnects + last error, live from the mcp/status seam |
| Try a tool | Ask the model to call it | Trial console → official ctx.tools.execute() pipeline (permission & approval stay in force) |
| Diagnose failures | Grep logs | /mcp <server> health with derived self-heal suggestions |
| Mistakes | Manual revert | Every write is append-only and leaves a timestamped backup |
The console's output IS cordis.patch.yml vocabulary — the same lines you would write by hand, generated, previewed, and applied safely.
Quick start
# 1. install the bundle into your profile
dsh plugin --profile web add "github:PerryLink/dsh-mcp-panel#main"
# or from npm (published releases)
dsh plugin --profile web add dsh-mcp-panel
# 2. restart and verify the row
dsh --profile web --dump-config | grep -A3 'id: mcp-panel'
Then open Settings → Plugins → MCP, or run:
/mcp
/mcp everything tools
/mcp everything health
/mcp everything call echo '{"message": "hi"}'
Install & uninstall
- git channel (latest
main):dsh plugin --profile web add "github:PerryLink/dsh-mcp-panel#main"— thepreparescript builds with production dependencies only. - npm channel (published releases):
dsh plugin --profile web add dsh-mcp-panel. - tarball channel:
pnpm packin this repo, thendsh plugin --profile web add ./dsh-mcp-panel-<version>.tgz. - uninstall: remove the
mcp-panelrow fromcordis.patch.yml(the web surface hot-reloads it), delete the package from the profile'snode_modules, and verify withdsh web --dump-configthat nomcp-panelrow remains.
Configuration
All tunables are Schemastery Config fields (changeable from cordis.yml). cordis.patch.yml documents each key inline.
| Key | Default | Meaning |
|---|---|---|
probeEnabled | true | Register the mcp_probe background-job tool (panel-only results) |
probeTimeoutMs | 10000 | Per-probe timeout in ms |
maxProbes | 10 | Probe records shown in the panel |
refreshIntervalMs | 0 | Suggested panel refresh in ms; 0 = on demand |
outputLanguage | en | /mcp output language: en | zh | es | pt | hi |
passiveProbeEnabled | false | Periodically probe streamable-http servers |
passiveProbeIntervalMs | 60000 | Passive probe interval in ms |
trialEnabled | true | Tool trial console (settings tab + /mcp call) |
trialTimeoutMs | 120000 | Panel-side deadline per trial call in ms |
trialMaxResultChars | 60000 | Cap on the trial result payload in chars |
writeEnabled | true | Kill switch: false rejects every profile write (copy still works) |
backupCount | 5 | cordis.patch.yml backups retained per write |
Tools & surfaces
| Surface | Kind | Notes |
|---|---|---|
/mcp | command | Per-server status row; model-readable and log-reconstructable |
/mcp <server> tools | command | Model-visible mcp__* tool names + descriptions |
/mcp <server> health | command | Derived self-heal suggestions from sanitized error text |
/mcp <server> call <tool> [json] | command | Trial-call through the official tool pipeline |
mcp_probe | tool | Optional Streamable HTTP connectivity probe (background job) |
| Settings → Plugins → MCP tab | UI slot | Status cards, server CRUD, and the tool trial console |
mcpPanel Typert Remote | service | Read-only snapshot channel (host → client) |
Resources & Prompts
The official client documents that "Tools are the only bridged MCP capability" — Resources and Prompts are deferred. The console feature-detects a proposed upstream catalog seam and will show read-only lists the day it ships; until then the capabilities board marks both pending upstream support.
Permissions & data
- Permissions: the
dshWorkshopmanifest declaresnetwork:outboundandnative-code:none. - Data: the panel is read-only; it writes only append-only
cordis.patch.ymlfragments (approval-gated, backup-first). URL query credentials, userinfo passwords, header values, bearer tokens, and JWTs are redacted before rendering; configuredheadersnever enter any snapshot, and env/header values never leave the host (the editor sees keys only).
Security boundaries
- The bridge stays the bridge. No transport, OAuth, or protocol changes; one mcp-client row per server, exactly as hand-written.
- No fake status. Connection fields without upstream observations read
unknown/—withstatusSource: 'derived'; exit codes and stderr tails are never invented. - Writes are append-only, approval-gated, and backed up. The console never rewrites
cordis.patch.yml; it appends generated operations and keeps the newestbackupCountbackups. - No prompt injection. The panel registers no prompt sections; its only model-facing text is the two tool/command descriptions.
Known limitations
- Resources & Prompts are pending upstream support — the official client bridges tools only.
- Exit codes / stderr tails are labeled pending upstream support until the client exposes them.
- Read-only panel — the console never fakes a connection state; unobservable fields read
unknown/-1/—.
Development
pnpm run typecheck && pnpm run typecheck:ci && pnpm test && pnpm run build && pnpm run verify:self-contained && pnpm run verify:artifacts && pnpm pack
scripts/verify-headless.mjs boots the real web profile and prints the exact /mcp output. Releases: node scripts/release.mjs <x.y.z> runs the full gate, commits, and tags v<x.y.z> locally (never pushes).
Topics
dsh, dsh-plugin, deepseek-harness, deepseek, cordis, mcp, mcp-client, observability, panel
Contributors
- @PerryLink — creator and maintainer.
- @xiaoyuyu6420 — diagnosed the missing client devDependencies behind clean-checkout build failures (PR #5).
PerryLink DSH Plugin Family
This project is one of the DeepSeek Harness plugins maintained by PerryLink. If this one helps you, the others likely will too:
| Plugin | One-liner |
|---|---|
| dsh-mask | PII masking middleware: anonymize at the model boundary, restore at the display layer |
| dsh-mcp-panel | Read-only MCP runtime panel: /mcp command + Settings tab with status, tools and errors |
| dsh-doublecheck | Engineering-discipline guard: requirements grill, test gates, adversary review |
| dsh-background-agents | Durable background child agents with a Web UI sidebar, messaging and interrupt |
| dsh-lsp-actions | LSP diagnostics, formatting, completion, code actions and rename over language servers |
| dsh-output-styles | Claude Code outputStyles-equivalent runtime style switching |
| dsh-checkpoint-rewind | Claude Code /rewind-equivalent: snapshots, session forks, one-shot restore |
| dsh-permission-rules | Claude Code-style declarative allow/deny/ask permission rules with audit |
| dsh-auto-review | Second-model auto-review on the approval chain, fail-closed by default |
| dsh-memento | Approval-gated cross-session memory: ctx.memory seam + SQLite + memory tool |
| dsh-skill-pack-security | Security-audit skill pack: secret scan, dependency and supply-chain review |
| dsh-session-pin | Pin sessions in the Web sidebar with durable ordering |
| dsh-composer-history | Terminal-style input history for the web composer: arrows, Ctrl+R search |
| dsh-github | GitHub PR/issues integration for DSH, every write gated by approval |
| dsh-plugin-guide | Plugin-development knowledge base as an on-demand agent skill |
| dsh-claude-move | Migrate Claude Code sessions, memory, skills and CLAUDE.md into DSH |
License
Apache License 2.0 © 2026 dsh-mcp-panel contributors
查看使用指南 →
该插件的安装步骤、关键要点、FAQ 与兼容性说明(基于已收录字段派生)。
收录徽章
[](https://deepseek-plugin.org/plugins/PerryLink/dsh-mcp-panel)把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。