dsh-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dsh-mcp start a session in my repo and fix the failing tests in the background"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🐳 DeepSeek-DSH-MCP
English | 中文
Give AGY (Antigravity) / Claude Code / Codex a coding buddy that sticks around — powered by DeepSeek Harness.
An MCP server that drives DSH as a long-lived agent runtime instead of wrapping a CLI. Open a conversation, hand it a goal, and it writes code, runs scripts and spawns its own subagents — while you watch, cut in, and collect the result whenever you like. 🛠️
🧪 504 checks green · 🔌 MCP over stdio · 📜 MIT · 💬 Community: linux.do
📌 Read the Usage Notes first — the practical gotchas that will actually bite you: the ACP model-config trap, external MCP tools bypassing DSH's sandbox, the workspace/GUI registry cache, cost control, and a troubleshooting table.
📑 Contents
Claude / Codex ──MCP(stdio)──▶ dsh-mcp
│ newline-delimited JSON-RPC (ACP)
▼
dsh --profile dsh-mcp ← one long-lived process per conversation
│
├─ DSH's own tools (files, shell, search, skills, subagents, workflows)
└─ dsh-mcp-client ─▶ your other MCP servers (e.g. IDA Pro)Related MCP server: codex-mcp-dsh
✨ Why it's different
🔄 A dead process never kills a conversation | The identity lives on disk. A crash, an idle reap, even restarting this whole server costs you nothing — the next call transparently resumes it, memory intact (verified across processes). |
🗣️ You are never stuck waiting | Steer a conversation mid-flight — interject to stop and redirect (~18 ms to converge), or queue a remark for after the current turn. Interrupting never damages the conversation. |
📡 Completion notification, not polling | Long tasks return instantly with a |
🪟 Many conversations at once |
|
🧠 Reasoning hidden by default | You get "thought for N chars / M seconds" statistics instead of context-burning prose — and it is never logged, never written to disk. |
🤫 Silent by default | Not one byte on stderr, so nothing pollutes your host's logs. stdout carries the protocol and nothing else. |
🧩 Capabilities compose | DSH can mount its own MCP servers (IDA Pro, browsers, your internal tooling), so this is a bridge to a whole toolbox. |
🛡️ Read-only that really is read-only |
|
⚡ Why not just wrap the DSH CLI?
DSH ships two programmable entry points. The sdk profile looks simpler, but its JSON-RPC surface has only 3 requests and 4 notifications — and it lacks three things that make an agent unusable in practice. The acp profile (Agent Client Protocol) has all of them. Everything below was verified against DSH 0.1.7-rc.2.
Capability |
|
|
Resume a conversation | ❌ no resume method; reusing an id fails with | ✅ |
Interrupt a running turn | ❌ only by killing the process | ✅ |
Answer approval prompts | ❌ no channel; operations silently fail closed | ✅ |
List / close sessions | ❌ none | ✅ |
Gray vs. black streaming | one message, split by a | ✅ two separate channels: |
Per-session MCP servers | ❌ process-wide | ✅ |
Core idea: the process is a cache, not the identity. A conversation's identity is DSH's sessionId, persisted under ~/.dsh/sessions. If the process is reaped, crashes, or the whole MCP server restarts, the next call transparently session/resumes it — history intact.
📦 Requirements
Node.js ≥ 20
DSH installed (
@deepseek-ai/dsh), with working credentials under~/.dshA DSH profile named
dsh-mcpderived from the shippedacptemplate, containing your own provider/model config (this repo deliberately ships no provider config)
🚀 Setup
1. Create the DSH profile
dsh dsh-mcp --from-default-profile acpThen edit ~/.dsh/profiles/dsh-mcp/cordis.patch.yml and declare your provider and model. Start from profile-example/cordis.patch.yml.
⚠️ Two traps here (both learned the hard way):
ACP's model does NOT come from
agent-default-model. It comes from thedsh-acpplugin's ownconfig.provider/config.model, which theacpbundle hard-codes todeepseek-official. If you don't override theacprow, your sessions silently run on the wrong provider and fail withno API key for provider route "deepseek-official".ACP's
reasoning_effortdefaults to empty (= "Provider default"), not to the maximum. This server explicitly sets it tomaxon everysession/newand after everysession/resume— because a fresh process does not remember the previous choice.
2. Register the server
One-Click Auto Setup (Recommended)
Automatically configures AGY, Cursor, Claude Code, and Gemini CLI, and installs the AGY skill:
npm run install-client
# or node ./bin/install.mjsManual Configuration
Google Antigravity (AGY Global ~/.gemini/config/mcp_config.json)
{
"mcpServers": {
"dsh-mcp": {
"command": "node",
"args": ["/absolute/path/to/DeepSeek-DSH-MCP/bin/dsh-mcp.mjs"]
}
}
}Claude Code
claude mcp add dsh-mcp -- node /absolute/path/to/DeepSeek-DSH-MCP/bin/dsh-mcp.mjsCodex (~/.codex/config.toml)
[mcp_servers.dsh-mcp]
command = "node"
args = ["/absolute/path/to/DeepSeek-DSH-MCP/bin/dsh-mcp.mjs"]Generic / Cursor MCP Client (~/.cursor/mcp.json)
{
"mcpServers": {
"dsh-mcp": {
"command": "node",
"args": ["/absolute/path/to/DeepSeek-DSH-MCP/bin/dsh-mcp.mjs"]
}
}
}3. Try it
node test/smoke.mjs # no LLM calls, verifies the whole plumbing🧰 Tools
Tool | What it does |
| Create a conversation: workspace, permission tier, approval policy, reasoning effort (default |
| Hand it a task. Defaults to |
| All conversations with live state: |
| Cursor-based incremental read of what a running conversation is producing right now |
| Conversation details; with |
| Interject while it's busy: |
| Preempt the write lock. The only way out when another DSH process holds it (DSH has no steal API — preempting means killing the holder). It classifies the holder first: our own orphaned child → taken automatically; another live instance → needs |
| Stop the current turn (the conversation stays healthy) |
| Hand the conversation back (frees the write lock so you can open it in your own DSH GUI). Still resumable |
| Adjudicate a pending approval (only when |
| Lightweight status check |
📋 Workflow: dispatch, then collect later
MCP tool calls block, so dsh_send does not block by default (wait=false): you get a receipt immediately, the turn runs in the background, and the sentinel file wakes you when it finishes. The whole flow:
1. dsh_send(conversation_id, prompt, wait=false)
→ { run_id: "run-abc123", background: true } # returns in ~1 ms
2. …keep working on something else (verified: another conversation ran a full turn meanwhile)…
3. dsh_status(conversation_id)
→ state=running | elapsed=3.5s | current_tool=pwsh | out=37 chars
4. dsh_read(conversation_id, cursor) # peek mid-flight
→ [me] … | [turn] turn 1 started | [tool] pwsh [in_progress]
5. dsh_get(conversation_id, run_id) # collect the result
→ status=done, elapsed=20.3s, full answerrun_id is the receipt. Run records are memory-only, last 20 kept; under many concurrent runs old ones get evicted and dsh_get will fail — which is exactly why the completion sentinel below carries the result.
🔔 Workflow: get notified on completion (no polling)
Besides run_id, wait=false returns a sentinel_file path plus sentinel_file_posix (the Bash/MSYS form — use it directly; hand-converting Windows paths is the easiest way to make your waiter hang until timeout). When the turn ends — whether it succeeds, fails, or is cancelled — the service atomically writes a small file there containing the final status and result. So you neither poll nor block: wait for that file with a background task in your own host (Claude/Codex); the moment it appears, you're woken up.
# sent="$sentinel_file_posix" ← copy it straight from the tool result
sent='/d/AI_MCP/DSH_MCP/.state/runs/<conversation_id>/<run_id>.json'
dl=$(( $(date +%s) + 2100 )) # 35min safety net so a dead service can't hang you forever
until [ -f "$sent" ]; do
[ "$(date +%s)" -ge "$dl" ] && { echo "TIMEOUT"; exit 1; }
sleep 2
done
echo "DONE" # task exits → host wakes you → read the file to collectOnce the file exists: read it for status and result (preferred — immune to the in-memory window and survives restarts), or use dsh_get(conversation_id, run_id).
Design notes (especially under concurrent multi-session use):
No cross-talk: the path is
.state/runs/<conversation_id>/<run_id>.json, namespaced by conversation.run_idsequence numbers are counted per-conversation, so two conversations can mint the samerun_idin the same millisecond — the per-conversation directory keeps them apart. Arm one background task per run; each completes and wakes you independently.Latch semantics: the file is written once and kept. Even if the run finishes before you arm the waiter,
[ -f ]is immediately true — you never miss it.Atomic write:
tmp+rename; if the file exists its contents are complete. Each run uses its own tmp, so concurrent writes never clobber.No server push: the service only answers requests over MCP (it sends no notifications). "Completion notification" is entirely the sentinel file plus your background waiter.
★ No reasoning in the sentinel: the payload carries the answer and thinking statistics only —
result.thinkingis stripped and replaced bythinking_omitted: true, because the project's rule is that reasoning never reaches disk.dsh_get(run_id)still returns it from memory while the record lives.DSH_MCP_SENTINEL_INCLUDE_REASONING=1breaks that guarantee deliberately.
Cleanup: sentinels contain full answers, so the service prunes sentinels older than 7 days at startup (tune with
DSH_MCP_SENTINEL_TTL_MS;0disables). Your waiter should stillrmthe file after consuming it.
🧵 Workflow: many conversations at once
1. dsh_list(only_running=true)
- … | id=448b239b… | 🔵 running (9s, tool=pwsh, 40 chars this turn) | cwd=…
- … | id=33427096… | 🔵 running (8s, 34 chars this turn) | cwd=…
2. dsh_read(id, cursor=0) # read the first, note the cursor
3. dsh_read(id2, cursor=0) # switch to the second
4. dsh_read(id, cursor=<prev>) # switch back, deltas only🤫 Reasoning: hidden by default
DSH separates reasoning from answer text at the model layer, and ACP exposes them as two independent streams. This server hides reasoning by default and returns only statistics (characters, duration, chunk count) — so the caller knows thinking happened without paying for it in context.
reasoning=hide(default) — content dropped, stats returnedreasoning=marker/summary/full— progressively more content (mind your context budget)dsh_read(include_reasoning=true)— live reasoning of the currently running turn only; it is never buffered and is discarded when the turn ends
🔐 Permissions
Tier | Approval default | Use for |
|
| Zero friction |
|
| Out-of-workspace operations surface as pending approvals |
|
| Analyzing untrusted samples (malware, unknown dumps) |
on_approval can be auto-allow, auto-deny, or ask (which exposes a pending approval for dsh_approval_decide to adjudicate).
🪟 Workspace visibility in the DSH GUI
Two different things — don't confuse them:
Depends on | Status | |
Workspace effectiveness | the conversation's | ✅ Always correct. Process working directory, file placement and sandbox write root all follow it |
GUI grouping |
| ⚠️ This server registers it, but the running DSH server caches the registry in memory — external file edits only take effect after a DSH restart |
Verified experimentally (test/workspace-effect.mjs): two conversations in two desktop folders, given no path at all, each wrote its file into its own workspace, self-reported the correct working directory, and leaked nothing into the server's cwd / home / temp / the other workspace (24/24 checks).
Maintenance CLI:
node bin/dsh-mcp-workspaces.mjs --list # inspect the registry
node bin/dsh-mcp-workspaces.mjs --backfill # register every session found on disk
node bin/dsh-mcp-workspaces.mjs --prune-temp # drop temp-directory entries
node bin/dsh-mcp-workspaces.mjs --prune-empty # drop empty workspaces whose path is gone
node bin/dsh-mcp-workspaces.mjs --purge-test-sessions # delete test sessions (strict rules)⚠️ Before restarting DSH, don't touch workspaces in the GUI — the server will write its in-memory state back over the file.
🕶️ Logging and privacy
Silent by default — not one byte is written.
MCP's stdout is the protocol channel; anything mixed in corrupts the stream.
This server is launched by Claude/Codex, so its stderr lands in their logs.
DSH's own stderr may carry model output including reasoning, so it is never forwarded by default.
Level | Behavior |
| nothing at all |
| this server's own lifecycle events only — never any DSH output |
| more of our own events; still no DSH output |
| additionally forward DSH's raw stderr (may contain reasoning) |
Reasoning never reaches disk — with exactly one deliberate exception:
Not in logs (silent by default), and the state file holds metadata only (id, cwd, permissions, counters) — a smoke-test assertion guards this.
The async completion sentinel does persist the answer (it must, so a caller can collect offline) but strips
result.thinkingand marksthinking_omitted: true. A test asserts that even whenreasoning=fullis requested, no reasoning text appears in the sentinel — whiledsh_get(run_id)still returns it from memory. SetDSH_MCP_SENTINEL_INCLUDE_REASONING=1to break this on purpose.Sentinels are pruned after 7 days by default (
DSH_MCP_SENTINEL_TTL_MS;0keeps them forever).
(DSH itself writes its own session log under ~/.dsh/sessions; that is what makes resume possible and is outside this server's control.)
⚙️ Environment variables
Variable | Default | Purpose |
| auto-detected | Path to |
|
| DSH profile to drive |
|
| Conversation registry, survives restarts |
|
| Root for async completion sentinels ( |
|
| Holder registrations for the write lock. ⚠️ All instances must agree on this value, or they cannot see each other's registrations and will misread each other as an unidentifiable holder (a GUI) and refuse to preempt |
|
| How long without a heartbeat before a holder counts as lost (and becomes auto-preemptible by |
|
| How long a conversation may sit idle before its DSH process is reaped. ★★ |
|
| ★ How many conversation processes to keep alive at once ( |
|
| Cache lifetime for |
|
| Startup pruning age for sentinels; |
| unset |
|
|
| Default tier for |
|
| Default reasoning effort |
|
| Wait bound for |
|
| How long a pending approval waits |
|
|
|
|
|
|
| unset |
|
🧪 Tests
node test/run.mjs # smoke only (no LLM calls)
node test/run.mjs --all # everything
node test/cleanup.mjs # suite teardown on its own (temp dirs only; --dry-run to preview)The suite cleans up after itself: run.mjs always ends with cleanup.mjs, which removes test sessions and workspace registrations inside the OS temp directory only. Real project sessions and the repo's .state/ (your live conversation registry and sentinels) are never touched. To also remove Desktop\dsh-mcp-test-* artifacts, run node bin/dsh-mcp-workspaces.mjs --purge-test-sessions explicitly.
Suite | Checks | Covers |
| 28 | handshake, tool table, conversation creation, config, registry purity |
| 42 | protocol edges (double initialize, malformed lines, unknown method), argument validation, unknown ids, cursor edges, lifecycle idempotence, unicode |
| 30 | resume-with-memory across processes, interrupt, both interject modes |
| 16 | fire-and-forget + later collection |
| 36 | completion sentinel: atomicity, latch semantics, per-conversation namespacing under concurrency, cancelled runs still land it, and reasoning never reaching the file |
| 11 | sentinel retention: prunes over-age and crash-leftover files, keeps fresh ones, removes empty shells, |
| 31 | environment-variable guards: odd numbers always land on the safe side — |
| 38 | timeout semantics: |
| 79 | write lock and preemption: four holder classifications, |
| 36 | the async dispatch lifecycle: dispatch → collect the sentinel → idle reap → dispatch again, three rounds with no lock error; re-dispatch right on the reap boundary (widening the race); an immediate re-dispatch after |
| 31 | three simultaneous conversations + live incremental reads |
| 22 | writing code, running scripts, spawning its own subagents (verified on disk via child session headers) |
| 24 | workspace actually effective when no path is given |
| 36 | two folders × two conversations doing a read-only IDA Pro analysis |
| multi | 19 | several instances and non-ASCII paths: reproduces "two instances share the registry and the later save drops the earlier instance's conversation", then proves that conversation is recoverable by id alone from the session store and actually usable; recovery never silently escalates privileges (a read-only conversation stays read-only); no .tmp residue; and CJK / emoji workspace paths create sessions, do real work, and place files in the right directory |
| permission | 11 | ★ whether the permission tiers actually take effect (a safety property): it ignores our own return values (the very thing that used to lie) and reads the session's own record (permissions.preset / sandboxMode in the projection cache), checking all three tiers and that their recorded values differ. This suite caught a silent privilege escalation: a defaultPreset in the profile overrides DSH_PERMISSION_MODE at session creation |
| list | 13 | the cost of dsh_list (measured): a default call with the on-disk probe takes ~1 s (it spawns a DSH process) while repeated calls hit a cache and drop to single-digit milliseconds; only_running=true and include_closed=false skip the probe with equivalent semantics (unopened on-disk sessions are simply excluded) |
Total: 504 checks, all green. (468 in-suite + 36 acceptance)
🔒 The write lock: one writer per conversation at a time
DSH conversations carry a cross-process write lock: it never expires while the holder lives, and no API can take it from a live holder — so whoever gets there first decides everything. This server turns that into "you can look, we can write":
Situation | Outcome |
This server holds the lock (the default) | ✅ Opening it in the GUI is read-only: you still see the content, but you cannot take the lock. The default |
You open it in the GUI while the lock is free | ❌ The GUI keeps it permanently (navigating away, waiting and archiving all fail to release it) and this server can never reconnect — only restarting |
Recommended | Watch progress with |
Who holds it is reported by dsh_status.lock_holder; dsh_takeover handles the four cases:
| Meaning | Action |
| this process holds it | nothing to preempt |
| the holder is alive but silent (no heartbeat for 90 s — typically that MCP is wedged) | ✅ |
| another live dsh-mcp instance is using it | ⚠️ refused by default; |
| no registration → most likely your own DSH GUI | ❌ never killed (GUI conversations live inside the single |
Two measured footnotes. ① A crash leaves no orphan lock —
SIGKILLthe MCP and its children exit with it (their stdio pipe closes), releasing the lock automatically ✓; sostale-mcpreally means "alive but wedged". ② Several instances: the registry is last-writer-wins (a later save drops conversations it never saw), but the session store is authoritative — any session on disk is recoverable by id alone; if you give instances differentDSH_MCP_STATEfiles, pointDSH_MCP_LOCKS_DIRat one shared directory, or they cannot see each other's holder registrations.The full measurements (the A/B probe method, the evidence that the GUI opens read-only, why even archiving does not release the lock, and crash-vs-wedge) are in Usage Notes §3.5–3.12.
⚠️ Known limitations
No token-level streaming into model context — an MCP limitation, not DSH's. Callers get per-step results; humans can follow progress via stderr logs.
True mid-turn steering is impossible — ACP rejects concurrent prompts (
a prompt is already in flight for this session).dsh_interjectis the practical equivalent: cancel, then immediately start a new turn, history preserved.Image prompts are unsupported — ACP advertises
promptCapabilities: {image: false}.Restarting the MCP server takes its children with it — when this service is restarted or killed, the DSH children it spawned exit too (their stdio is a pipe to us): in-flight turns are interrupted and no sentinel lands (judge by inspecting the workspace, don't just wait for the file). The good news: the write lock is released automatically, so a restart always gets it back. The service also pushes no MCP notifications; "completion notification" is the sentinel file plus the caller's background waiter.
A conversation that dies before its first successful turn may never have materialized on disk — resume then fails with a clear error. Safe after the first message.
No renaming — DSH's title subsystem has no external rename API (
SessionTitleService.renamerequires a live in-process session). Titles are auto-generated from the first message.session/listreturns only{sessionId, cwd}and excludes already-open sessions — titles are filled in by this server from DSH's projection cache."Never reap" costs memory (measured ~120 MB per conversation) — that is what buys "the GUI can never take the write lock". Two ways to spend less: ①
DSH_MCP_MAX_LIVE(default 8 — over the cap, the least recently used process is reaped → bounded memory, locks still held where it matters); ② setDSH_MCP_IDLE_TTL_MSto a millisecond value (at the cost of the lock being takeable). To drop to zero right after a batch of work:dsh_release(all=true)✓ (lossless, everything resumes on demand).
💬 Community
This project is announced and discussed on linux.do — usage questions, war stories and suggestions are all welcome there. Issues work too, but you'll usually get a faster answer in the community.
📜 License
MIT — see LICENSE.
Available Tools
11 toolsdsh_approval_decideA
裁决一个待决审批(仅当会话的 on_approval=ask 时会出现)。用于把 DSH 的越权/提权请求交给调用方决定,既不一律放行也不一律拒绝。
Inputs: decision (required), approval_id (required), conversation_id (required).
dsh_getA
查看单个会话的详情;带 run_id 时取那一次派活的最终结果(异步模式的验收入口)。不传 run_id 则取最近一次回合。返回:标题、工作区、权限档、状态、轮数、token 用量、上下文压力、待决审批,以及该回合的完整结果(正文/工具/用量/错误)。
Inputs: conversation_id (required), run_id.
dsh_interjectA
插话:会话正在跑某个回合时往里补一句话。两种模式——interject(默认)打断当前回合并立刻改口;queue 不打断,等本轮自然结束后紧接着说。会话空闲时等同于一次普通 dsh_send。说明:ACP 明确拒绝并发 prompt,所以做不到"让模型在同一个回合里即时改向";interject 是它的实用等价物(取消 + 立刻开新回合,历史完整保留)。
Inputs: message (required), conversation_id (required), mode, reasoning, +1 more.
dsh_interruptA
中断会话当前正在进行的回合(ACP 原生 session/cancel,走的就是用户手动按停止那条路径)。会话本身保持完好,可以立刻继续派新任务。
Inputs: conversation_id (required).
dsh_listA
列出会话及其运行状态,用来掌控多个会话实例。state: running(正在跑回合)/ idle(进程活着但空闲)/ detached(进程没开,可 resume 复活)。running 的会话会带上已跑时长、当前正在执行的工具、本轮已产出字数。数据来自两路合并:本服务持有的 + DSH 磁盘上尚未打开的(DSH 的 session/list 会排除已打开的会话)。想只看正在跑的,传 only_running=true;想看某个会话当前吐出的内容,接着用 dsh_read。
Inputs: cwd, only_running, include_closed.
dsh_readA
读会话的运行期输出(游标式增量)——用它可以看到"正在跑的会话"当前吐出了什么,不必等回合结束。典型用法:dsh_list(only_running) 找到在跑的会话 → 反复 dsh_read 并回传上次的 cursor,就能像切换窗口一样轮流观察多个会话。输出缓冲只在内存里且有界(环形,满则丢最旧),服务/进程退出即消失;思考内容不进缓冲——只有 include_reasoning=true 时才会附带"当前正在跑那一轮"的实时思考。
Inputs: conversation_id (required), limit, cursor, include_reasoning.
dsh_releaseA
释放会话占用的 DSH 进程(释放写锁,让用户能在自己的 DSH GUI 里打开同一个会话)。会话本体留在磁盘上,之后仍可 resume;forget=true 才会从注册表里摘掉。★ 用完了想一次性腾内存就传 all=true(默认"永不回收"下每个会话约 120MB,全放掉即立刻归零,之后随时 resume)。
Inputs: all, forget, conversation_id.
dsh_sendA
向会话派一个任务。默认不阻塞(wait=false):立即返回 run_id + sentinel_file,回合在后台跑,跑完自动通知你 —— 你继续做别的事,也永远不用担心任务被"超时"打断。想原地等结果就显式传 wait=true(可配 timeout_ms;到期只会转后台,不会取消回合)。【超时不会毁掉任务】wait=true 到达 timeout_ms 仍没跑完时,本工具不会报错、也不会取消回合,而是自动降级为后台:返回 run_id + sentinel_file,回合继续跑完,结果稍后由哨兵文件通知。(timeout_ms=0 表示一直等。)所以任何时候你都能拿到结果,不用怕"超时了白干"。等待模式与后台模式都在回合结束时原子落地一个含最终结果的小文件——推荐用后台任务(Bash run_in_background + until [ -f sentinel_file ])等它,跑完自动通知你,无需轮询;文件出现后读它即得结果,或用 dsh_get(conversation_id, run_id) 验收,dsh_read 可中途看输出。默认隐藏思考内容(只返回正文 + 思考统计)。若会话正在忙,本工具会报错——改用 dsh_interject 插话,或用 dsh_interrupt 先打断。
Inputs: prompt (required), conversation_id (required), wait, reasoning, +1 more.
dsh_startA
新建一个 DSH 会话(一个可长期共事的编码 agent)。会话活在磁盘上,进程只是缓存;进程被回收或崩溃后会自动用 ACP session/resume 复活,对话不丢。返回 conversation_id 与对话标题。建好后用 dsh_send 派活。
Inputs: cwd (required), model, provider, permission, +3 more.
dsh_statusA
轻量状态查询:会话是否活着、是否在忙、待决审批数、最近一次回合的结果。
Inputs: conversation_id (required).
dsh_takeoverA
抢占会话的写锁(DSH 的写锁是跨进程内核信号量,持有者活着就不过期,没有 API 能直接夺走——唯一手段是杀掉持有者进程,所以本工具会先判定持有者是谁):① 若锁其实空着,正常 resume 即可,不会杀任何东西;② 若持有者是本服务自己留下的孤儿进程(MCP 崩了/重启了,子进程还活着握着锁)→ 自动杀掉并接管,安全;③ 若持有者是另一个活着的 dsh-mcp 实例 → 默认拒绝,传 force=true 才夺;④ 若持有者无法识别(多半是你自己的 DSH GUI 正开着这个会话)→ 绝不杀(那会连你的界面和正在看的对话一起杀掉),只报告,请你在那个窗口里关掉该会话后重试。注意:杀掉正在跑回合的持有者会中断那一轮(会话日志记为 interrupted),会话本体不受损。
Inputs: conversation_id (required), force.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools have sharply distinct purposes: start/send/interrupt/interject/takeover/release map to different lifecycle actions, and send vs read vs get are separated by blocking mode, streaming cursor, and final result retrieval. The main overlaps are dsh_status vs dsh_get (both report liveness, pending approvals, and last-round result) and dsh_interrupt vs dsh_interject (interject = cancel + new turn), but the descriptions explicitly disambiguate these cases.
All 11 tools share a uniform dsh_ prefix with snake_case and mostly verb-first or clear action names (dsh_start, dsh_send, dsh_list, dsh_read, dsh_get, dsh_release, dsh_interrupt). Minor deviations are dsh_approval_decide (noun_verb order) and dsh_status (state rather than action), but the pattern remains predictable.
Eleven tools is well within the healthy range and matched to a session-lifecycle domain with real complexity (async runs, locks, approvals). A couple of tools are arguably redundant (dsh_status largely duplicates a subset of dsh_get), so it is slightly heavier than strictly necessary.
The surface covers the full session lifecycle: create, dispatch, observe (list/read/get/status), steer (interject/interrupt), lock management (takeover/release), and approvals. Gaps are minor: deletion and registry removal are only reachable via a forget flag on dsh_release, and there is no tool to configure session settings such as on_approval or permission level, which the descriptions reference.
Maintenance
Related MCP Connectors
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Start and manage Reason cloud coding agents, projects and sessions from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables external MCP clients to drive DeepSeek Harness agents for real coding tasks, providing tools for task execution and queueing, session management, sandboxed file access, preset switching, and usage statistics.323 npm9GPL 3.0
- FlicenseAqualityCmaintenanceEnables MCP clients like Codex CLI and Claude Code to delegate tasks to a local DeepSeek Harness (dsh), with native Web transport for visible progress, model selection, and persistent long-running jobs, plus an ACP-compatible transport.61-
- AlicenseNot gradedqualityCmaintenanceExposes DeepSeek Harness agent capabilities over MCP so any MCP client can delegate real coding work to a running agent with its full toolset (bash, filesystem, todo, web). Turns are dispatched asynchronously into sessions and then tracked through status, tail, wait, cancel, compact, and rename tools, with the session log as the source of truth so results survive restarts.MIT
- AlicenseNot gradedqualityBmaintenanceLets an external MCP client drive a running DeepSeek Harness instance: list its sessions, create or continue a session in a chosen workspace with an instruction, and wait for the finished answer. It also carries the instance's questions and approval decisions back to the caller, so a delegated turn never deadlocks waiting for a human.MIT