openpencil
ZSeven-W
The world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:wuhobin/dsh-mcp-manage
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Label:
dsh plugin· A DeepSeek Harness (DSH) static plugin that adds an MCP 服务 management page in Settings.
Manage the MCP servers DSH registers through cordis.patch.yml: list / add / edit / delete each MCP service, and — most importantly — run a real MCP initialize connection handshake against every server so you can see at a glance whether each MCP service connects normally.
This is a static DSH plugin (the same shape as a plugin-market package): once installed it is a dependency of the
profile and is loaded by the bundle layer on every boot — it survives restarts, no pasting code, no cordis_define.
pnpm add)dsh plugin --profile web add dsh-mcp-manage
pnpm add, then auto-reconciles dsh.profile.bundles in <profile>/package.json: because the package
declares dsh.bundle, it joins the profile layer stack automatically. No manual insert: editing — DSH reads the
package's dsh.bundle.patch (static/cordis.patch.yml) at boot and turns it into an active loader entry.dsh web),
then open Settings → MCP 服务. If the page doesn't appear, hard-refresh the browser (Ctrl/Cmd+Shift+R).⚠️ Gotcha: a bare
pnpm add dsh-mcp-manageinstalls the package intonode_modulesanddependenciesbut does not add it todsh.profile.bundles— so it never becomes a loaded layer and the page won't appear after restart. Always install throughdsh plugin ... add, which does the reconcile step for you.
dsh is not on your PATHdsh is shipped as a npx/npm-cache binary, so a terminal that lacks the right PATH may report dsh: not recognized.
Any of these works:
# 1) new terminal (often fixes PATH) then the normal form:
dsh plugin --profile web add dsh-mcp-manage
# 2) wrap in npx — independent of PATH:
npx --yes @deepseek-ai/dsh plugin --profile web add dsh-mcp-manage
# 3) invoke the packed bin directly with node (never depends on PATH):
node "<npm-cache>\_npx\<hash>\node_modules\@deepseek-ai\dsh\lib\bin.js" plugin --profile web add dsh-mcp-manage
After you bump the version and publish a new release, update the installed copy, then restart DSH:
dsh plugin --profile web update dsh-mcp-manage
dsh plugin --profile web remove dsh-mcp-manage
This runs pnpm remove and reconciles dsh.profile.bundles, so the package is removed from node_modules, from
dependencies, and from the profile layer stack in one command — no manual cordis.patch.yml edits needed. The change
takes effect on the next DSH restart (the already-running process keeps the old layer until then).
As with install, use the
dsh plugin ...wrapper rather than a barepnpm remove— the wrapper is what also drops the entry fromdsh.profile.bundles; a barepnpm removewould leave a stale bundle-layer reference.
The package carries a dsh.bundle.patch (static/cordis.patch.yml):
- insert:
- id: dsh-mcp-manage
name: 'dsh-mcp-manage'
so DSH's bundle layer turns it into an active loader entry automatically. You only need to add the dependency
once (through dsh plugin ... add); the UI page and routes appear after a restart.
Its manifest is also compatible with the built-in plugin market (
dshmarket), so it could be listed there too — but this package is primarily distributed as an npm package installed viadsh plugin ... add dsh-mcp-manage.
settings.section → id mcp-manage, order 30).initialize handshake, not a ping:streamable-http → a real authenticated POST initialize session via the official MCP SDK.stdio → actually spawns the server command and completes an MCP initialize over stdio.cordis.patch.yml (insert:-blocks for
@deepseek-ai/dsh-mcp-client).The dynamic plugin the author originally shipped used the dynamic-runner sandbox APIs (harness.handle / host.call),
which only exist inside dsh-cordis-*-runner. A static plugin runs in the normal (non-sandbox) plane and gets no
harness/host.call; it uses the real services instead. This package is ported to that model:
| layer | file | does what |
|---|---|---|
| Host (Node) | static/index.js |
ESM Cordis plugin exporting name + apply(ctx, config). ctx.inject(['webServer'], …) mounts HTTP routes /dsh-mcp/list, /dsh-mcp/check, /dsh-mcp/save. Uses real node:fs / node:os / node:child_process. |
| Client (browser) | static/client.js |
A window.__ModuleLoader__.load({ id, factory }) bundle (only external is react). Registers settings.section via ctx.slots.inject(...) and fetch()es the host routes. |
| Bundle patch | static/cordis.patch.yml |
dsh.bundle.patch → inserts { id: dsh-mcp-manage, name: 'dsh-mcp-manage' } so the loader activates it. |
| Probe | probe/dsh-mcp-probe.cjs |
Standalone real-MCP initialize handshake (official @modelcontextprotocol/sdk), self-terminating. |
| route | method | purpose |
|---|---|---|
/dsh-mcp/list |
GET | list servers + the auto-detected profile patch path |
/dsh-mcp/check |
GET | run a real handshake per server → {id, status, message} each |
/dsh-mcp/save |
POST | persist the edited server list back to cordis.patch.yml (same-origin only) |
The host derives the runtime layout the same way the dynamic host did, but with real Node:
DSH_HOME (an existing .dsh directory) or HOME → <profilesRoot>.profilesRoot = <DSH_HOME>/profiles (or <HOME>/.dsh/profiles).SDK_ROOT = <profilesRoot>/node_modules.PATCH_PATH = first <profilesRoot>/<p>/cordis.patch.yml whose content references @deepseek-ai/dsh-mcp-client;
PATCH_DIR = its directory, where dsh-mcp-probe.cjs is written.package.json satisfies the exact contract the DSH client loader validates, so the package loads as a real static
plugin once installed (and would also be eligible for a plugin-market listing):
main → ./static/index.js (host entry artifact).exports["./client"] → ./static/client.js (browser bundle).dsh.client.platform: "web" (+ optional inject).dsh.bundle.patch → static/cordis.patch.yml.peerDependencies["@deepseek-ai/cordis"] ≥ ^4.0.1.These match what dshmarket itself ships and what dsh-client-modules requires
(parseDshClient needs platform:"web", clientExportOf needs exports["./client"]).
dsh-mcp-manage/
├── package.json # static-plugin manifest (dsh.bundle.patch + dsh.client.platform + main/exports)
├── README.md
├── LICENSE # MIT
├── static/
│ ├── index.js # Host: ESM Cordis plugin → webServer routes list/check/save
│ ├── client.js # Client: __ModuleLoader__.load bundle → Settings → MCP 服务 UI
│ └── cordis.patch.yml # dsh.bundle.patch → inserts { id, name } into the composed entry list
├── probe/
│ └── dsh-mcp-probe.cjs # Standalone real-MCP-initialize handshake
└── test-parse.js # YAML-subset parse test used during development
plugin/(the original dynamicharness.handle/host.callversion) is kept in the git history for reference; the installable package usesstatic/. If you want the dynamic, session-only variant instead, see theplugin/*.jssource in an earlier commit.
# stdio server
node probe/dsh-mcp-probe.cjs "{\"sdkRoot\":\"/abs/path/node_modules\",\"transport\":\"stdio\",\"command\":\"/abs/path/server\",\"args\":[\"stdio\"],\"env\":{\"TOKEN\":\"...\"},\"timeoutMs\":15000}"
# streamable-http server
node probe/dsh-mcp-probe.cjs "{\"sdkRoot\":\"/abs/path/node_modules\",\"transport\":\"streamable-http\",\"url\":\"https://host/mcp\",\"headers\":{\"Authorization\":\"Bearer ...\"},\"timeoutMs\":15000}"
probe is also wired as an npm script: npm run probe -- "<spec-json>".
Credentials (e.g. Authorization: Bearer …, GITHUB_PERSONAL_ACCESS_TOKEN) go only into the probe process; the
result reports only ok / name / ver / error, never the headers.
dsh.bundle.patch / dsh.client / webServer / client-modules).@modelcontextprotocol/sdk) for the real initialize handshake.CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: mcp、mcp-client、model-context-protocol。