dsh-at-file
FSMargoo/dsh-at-fileCodex 风格的 `@file` 文件引用,输入框里直接搜索并引用工作区文件。
在 Web 设置面板中查看、添加、编辑、删除、启用或停用 MCP 服务器,保存后热重载。
English | 中文
DSH web plugin: manage MCP servers from the settings panel. View, edit, remove,
enable, and disable MCP servers, then Save — the change hot-reloads immediately
(no process restart), because each server is a live @deepseek-ai/dsh-mcp-client
loader entry.
serverName, transport
(stdio / Streamable HTTP), command or URL, and live state (enabled / disabled,
plus the connection phase: active, failed, loading, …).serverName, transport, command
args + cwd + env (stdio), or url + headers (HTTP), plus the
per-call timeout and the failOnStartupError flag.disabled flag without touching
its config, so a disabled server keeps its full configuration.create / update / remove), then writes the server set back
to the profile's cordis.patch.yml (the durable patch layer). Each operation
restarts only the affected dsh-mcp-client instance, which is the same
hot-swap the harness HMR performs.A dual-face npm package installed into the web profile:
| Half | Entry | Role |
|---|---|---|
| Server | lib/index.js | Cordis plugin (inject: ["loader"]): mounts the ctx.mcp typert service that projects and reconciles the loader's @deepseek-ai/dsh-mcp-client entries. |
| Protocol | lib/typert.js | Host TYPERT face (mcp/list, mcp/save), auto-registered by dsh-typert-loader. |
| Browser | lib/client.js | React page mounted into the settings.section slot; calls the host through the installed remote.mcp namespace. |
The client↔server channel is the DSH typert protocol: strict zod codecs validate every argument and result on both sides.
dsh plugin --profile web add @opendsh/dsh-plugin-setting-mcp
cordis.patch.ymlThe plugin manages the dsh-mcp-client rows in the profile's cordis.patch.yml
(the user patch layer — not cordis.yml, which the launcher resets to an
empty list on every boot). A stdio server is the same as:
# cordis.patch.yml
- insert:
- id: mcp-github
name: "@deepseek-ai/dsh-mcp-client"
config:
serverName: github
transport: stdio
command: npx
args: ["-y", "@modelcontextprotocol/server-github"]
env:
GITHUB_TOKEN: ...
and a Streamable HTTP server is the same as:
# cordis.patch.yml
- insert:
- id: mcp-web
name: "@deepseek-ai/dsh-mcp-client"
config:
serverName: web
transport: streamable-http
url: http://localhost:3000/mcp
headers:
Authorization: ...
The tool names the model sees stay server-qualified (mcp__<serverName>__<tool>),
exactly as with hand-written entries.
pnpm install
pnpm --filter @opendsh/dsh-plugin-setting-mcp build
pnpm --filter @opendsh/dsh-plugin-setting-mcp test
reconnect is not surfaced by the editor. A disabled/enabled toggle and
edits to other servers keep the stored reconnect block; the editor itself
cannot view or change it.reconnect fields and future MCP capabilities (resources,
prompts) are out of scope for this panel; they remain configurable directly in
cordis.patch.yml.