dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
MCP Master for DeepSeek Harness: per-session MCP server picker with global and project (.mcp.json) catalogs, OAuth sign-in, and trust review
English | 中文
MCP Master for DeepSeek Harness. Choose which MCP servers each session uses — from your global list and the workspace's project list — with a picker that sits right before the composer's model selector. Pick them when a session starts, and switch them at any time afterwards, just like the model.
.mcp.json (Claude Code), .cursor/mcp.json, .vscode/mcp.json, .dsh/mcp.json.~/.dsh/mcp-master/mcp.json (same mcpServers format). A project server shadows a global one of the same name.// <workspace>/.mcp.json or ~/.dsh/mcp-master/mcp.json
{
"mcpServers": {
"orion-mcp": { "command": "uv", "args": ["run", "--project", ".", "orion-mcp"] },
"atlassian-mcp-server": { "type": "http", "url": "https://mcp.atlassian.com/v1/mcp/authv2" },
"conduktor-console": { "command": "npx", "args": ["mcp-remote", "https://…/api/mcp", "--header", "Authorization: Bearer ${CONDUKTOR_API_TOKEN}"], "enabled": false }
}
}
[ 🔌 MCP 2 ● ] [ model ▾ ] [ ➤ ] — in the composer row of every session, including a brand-new one.
default tag, and inline Sign in / Retry. Expand a row for the command/URL (as written — never variable-expanded), auth, server version, tools, logs, Reconnect, Sign out, Revoke trust.enabled flags).| Topic | Behavior |
|---|---|
| New session | Starts from the workspace default: the saved one, or else every trusted server whose file entry is not "enabled": false / "disabled": true. |
| Forks & subagents | Inherit the parent session's selection (parentSession). |
| Switching later | Checking/unchecking registers/unregisters that server's tools in this session only, from the next step on. DSH itself records tool additions/removals in the session log (developer/message tool-addition/removal), so history, resume, and replay stay consistent — unlike an agent preset, which is a whole plugin composition and therefore locked once the session starts. |
| Persistence | Selections, defaults, trust, and OAuth tokens live in ~/.dsh/mcp-master/state.json (0600). Config files are never modified. |
| Process lifetime | A server runs while a live session — or a session open in the UI but not started yet — selects it; it stops 2 minutes after the last one deselects it, and a workspace with no sessions or viewers shuts down after 15 idle minutes. |
A .mcp.json in a cloned repository can run any command, so project servers must be trusted before they run (same model as Claude Code's project-server approval). Checking an untrusted server shows the exact command/URL with Trust & use. Trust is per workspace and bound to the entry as written: if the command, args, env, URL, or headers change, the server becomes Changed and needs review again. Global servers are yours and always trusted. autoTrust: true skips the review.
list_changed stream), legacy HTTP+SSE (automatic fallback). Server→client ping / roots/list are answered.resource, then refresh. Tokens are keyed by server URL, so one sign-in covers every workspace. An explicit Authorization header is used as-is; "oauth": { "clientId", "clientSecret", "scope" } covers providers without dynamic registration.${VAR}, ${VAR:-default}, ${env:VAR}, ${workspaceFolder} — resolved from DSH's environment layered over your login-shell environment (so ~/.zshrc exports and your shell PATH work in the desktop app).mcp__<server>__<tool> like the built-in MCP client; input schemas are folded into the registry's JSON-Schema subset ($ref, nullable anyOf, type arrays, allOf; dropped constraints become description hints); readOnlyHint tools may run in parallel.# your profile's cordis.patch.yml
- id: mcp-master
name: dsh-mcp-master
config:
globalConfigFile: ~/.dsh/mcp-master/mcp.json # false disables the global scope
configFiles: [.mcp.json, .cursor/mcp.json, .vscode/mcp.json, .dsh/mcp.json]
autoTrust: false
searchParents: true # also look in parent directories of the session cwd
startupWaitMs: 5000 # a new session waits this long for selected servers that are still starting
connectTimeoutMs: 60000
toolCallTimeoutMs: 300000
idleShutdownMinutes: 15
/mcp-master/api/* passes DSH's connection fence (Host/Origin + browser authentication); mutating calls also need a custom header that cross-origin pages cannot send without a CORS preflight; paths must be inside registered workspaces or live session directories./mcp-master/oauth/callback) opens in your system browser without the DSH cookie and is authorized by a single-use 192-bit state.Bearer values; command lines are shown unexpanded. state.json holds tokens — treat it like a credentials file.pnpm install
pnpm run verify # build + typecheck + tests (node --test runs the .ts tests directly)
| Path | Role |
|---|---|
src/index.ts | Host entry: options, agent lifecycle hooks, route mounting |
src/host/config.ts | Catalog discovery (project + global), dialects, variable expansion, fingerprints |
src/host/runtime.ts | Trust, defaults, per-session selections, server lifecycle, per-agent tool registration |
src/host/state.ts | Persistent state (~/.dsh/mcp-master/state.json) |
src/host/stdio.ts, http.ts, jsonrpc.ts | MCP transports and JSON-RPC plumbing (zero runtime dependencies) |
src/host/oauth.ts | MCP authorization (discovery, DCR, PKCE, refresh) |
src/host/schema.ts, tools.ts | Schema folding and ToolDefinitions |
src/host/api.ts | HTTP API + OAuth callback |
src/client/* | Composer picker (React; __ModuleLoader__ bundle; portal popover like the model menu) |
src/shared/types.ts | Wire contract between the halves |
After rebuilding an installed copy, restart DSH: the Host module is an ES module and is not re-imported in place.
MIT