Exposes DSH as an MCP server so another agent can watch its thinking, tool calls and file writes in real time, share intent, take a floor lock that denies DSH's write/edit/git tools, inject mid-turn alerts, and delegate reviews.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-as-mcp-server
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:qian-dsh/dsh-as-mcp-server
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
English | 中文
Exposes DSH as an MCP server, so any MCP client can watch what the agent is doing and steer it mid-flight.
Two agents on one workspace normally means two agents overwriting each other. This bridge gives them a shared protocol instead: what the other side is thinking, what it's touching, who owns the floor, and a way to interrupt.
What the other client gets
| Capability | Mechanism |
|---|---|
| See the agent think | LLM stream deltas → notifications/dsh/thinking (200 ms throttle) |
| See what it touches | tool calls → notifications/dsh/tool; write/edit targets → notifications/dsh/file |
| Share intent | dsh_set_intent / dsh_get_intent, auto-injected into DSH's system prompt every turn |
| One writer at a time | dsh_lock_acquire / dsh_lock_release floor lock — while held, DSH's write/edit/git are physically denied |
| Interrupt the current turn | dsh_inject_alert → injected through agent/pre-step into the running step |
| Delegate a review | dsh_review_request → inbox on disk (inbox/<id>.json), result written back to inbox/done/ |
The 8 MCP tools
dsh_get_status · dsh_get_intent · dsh_set_intent · dsh_lock_acquire · dsh_lock_release · dsh_lock_status · dsh_inject_alert · dsh_review_request
Notifications (server → client, SSE)
notifications/dsh/status · thinking · tool · file · intent · lock · alert-queued · review
Install
dsh plugin --profile web add dsh-as-mcp-server
Then add the bridge to your MCP client — any client speaking Streamable HTTP works (WorkBuddy, Claude Desktop with an MCP-HTTP adapter, Cursor, Cline, …):
{
"mcpServers": {
"dsh-bridge": {
"type": "streamableHttp",
"url": "http://127.0.0.1:51630/mcp",
"timeout": 60000
}
}
}
Restart DSH. The log should show [dsh-as-mcp-server] MCP server 就绪: http://127.0.0.1:51630/mcp.
Self-test without installing
# terminal A — start a demo server on 51999
node dsh/mcp.js 51999
# terminal B — handshake, all 8 tools, floor lock, SSE stream
node dsh/mcp-test.js http://127.0.0.1:51999/mcp
Expected: 13 checks pass, ending with 全部通过 ✅.
There is also a unit-level regression suite that runs with no server:
node dsh/bridge-regression.test.mjs # 13 pass / 0 fail
Configuration
~/.dsh-mcp-bridge/config.json (all optional):
{
"port": 51630,
"host": "127.0.0.1",
"token": "",
"lockTtlMs": 300000,
"denyTools": ["write", "edit", "git"],
"alertInjection": true,
"inboxRoot": ""
}
inboxRoot defaults to ~/.dsh-mcp-bridge/inbox.
Honest boundaries
- Loopback only by default. Binds
127.0.0.1; atokenis supported but empty by default. Do not expose the port. - The lock is enforced on the DSH side only. While held, DSH's
write/edit/gitare denied attools/pre-execute. The remote client is trusted to honour the lock by convention — this is a coordination primitive, not a security boundary between mutually hostile parties. - Alert injection is best-effort. It goes through
agent/pre-step. If the current step cannot be injected, the alert stays queued and lands on the next step. - One Server + transport per client. That is an MCP SDK constraint; multiple clients (a recorder and an agent, say) each get their own. A reconnecting client must use a new
sessionId. - The thinking stream forwards text deltas only, and tool arguments are truncated to their first 120 characters — this is a visibility channel, not a full transcript tap.
License
MIT
Links
More in this category
Clearailhc/clearai-dsh★ 696
An agent preset for evidence-checked research: every step advances only through system-verified observations, L3+ claims go to an independent evaluator, and the session folds into a replayable ledger that grows into a browsable domain ontology. Requires DSH >=0.1.7-alpha.1.
FuRongJun-1999/dsh-memory★ 672
White-box AGI architecture exploration: metacognition (self-cognition loop), continual learning (knowledge flywheel), world model (condition space, spatiotemporal memory graph), self-improvement (bootstrap discipline), zero-LLM white-box pipeline, and auditable trust guardrails.
icyaaaww/dsh-soul★ 85
Records recurring task corrections and tool failures locally, then compiles them into changes to eight harness components through explicitly started evolution, paired baseline/candidate checks, trial activation and rollback. Includes a budget and audit ledger; requires Node.js 24+ and a compatible DSH 0.2.1-rc.2 or later 0.2.x host.
MichengAI/dsh-pua★ 72
Adds /pua to steer the agent to try another approach and verify results before claiming completion, with 15 company styles, persona modes, global and per-conversation settings, and an optional loop that continues until a verification command passes, the iteration limit is reached, or the user cancels.
kenz1117/dsh-engram★ 70
Cross-session long-term memory as a local SQLite store: dual scopes (user + per-git-origin project), hybrid FTS5 + local-vector retrieval fused with RRF, an evidence gate that forces an explicit sufficiency judgement, provenance audit chains, SM-2 spaced-repetition review, consolidation distillation and decay forgetting, and a nine-view "Memory Palace" sidebar panel. 22 narrow-parameter tools, no external service, no API key, no Docker.
pk14742952-AD/dsh-host-rsi★ 39
Reflective self-evolution plugin for local Qwen3.8 27B/3.8 Flash and online APIs: a coding-loop convergence steerer curbs Qwen3.8 27B/Flash repeated-verification deep-thinking to converge faster and cut thinking time; a five-state delivery guard detects and corrects stuck turns and infinite loops; model-agnostic host logic, mostly compatible with online APIs; per-use continual self-improvement with counter-reason self-checks, critic escalation, inverted-index memory retrieval, coding-loop convergence steering, and a five-state delivery guard.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.