dsh-call
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ClaudeCallDSH — 让 Claude Code 在 DSH 里唤起会话并派任务
一个双向自洽的小桥:
DSH 侧:一个 Host 插件(
dsh-claude-call),在127.0.0.1上开一个独立的回环 HTTP 服务,收到请求后调用ctx.sessionController.create()建会话、prompt()投递任务,再从 会话日志(唯一真相)里读出turn/end和最后一条assistant/message作为答复。Claude Code 侧:一个零依赖的 MCP stdio server(
mcp/server.mjs),把桥包装成 5 个工具:dsh_task/dsh_send/dsh_wait/dsh_status/dsh_cancel。
Claude Code ──(MCP stdio)──> mcp/server.mjs ──(loopback HTTP + token)──> dsh-claude-call 插件
│
sessionController.create / prompt
│
DSH 会话(独立 Agent)为什么是独立监听,而不是复用 DSH 的 Web 端口
DSH Desktop 的 Web 服务外面有一层 desktopBrowserAccess 网关:只有 Electron renderer(带
x-dsh-desktop-renderer 头)或显式放行的普通浏览器能访问,其余请求一律 403 forbidden。
插件不应该去冒充 renderer(那等于把桌面端的安全边界偷偷扩大),所以桥自带一个只绑
127.0.0.1、端口默认由内核分配的监听,用自己的随机 token 做认证。
Related MCP server: dsh-mcp
已完成的安装(本机)
bundle:
dsh-claude-call,以 pnpmlink:方式挂在~/.dsh/profiles/desktop/node_modules/dsh-claude-call→ 指向本仓库。插件行:
claude-call(profile 的cordis.patch.yml里有一条port: 0的覆盖)。发现文件:
~/.dsh/claude-call/endpoint.json(插件激活时写入,卸载时删除):{ "schema": 1, "name": "claude-call", "version": "0.1.0", "origin": "http://127.0.0.1:<随机端口>", "route": "", "token": "<每次启动随机生成的 48 位十六进制>", "pid": 12345, "updatedAt": "2026-11-22T15:44:31.709Z" }
在 Claude Code 里注册 MCP server
claude mcp add -s user dsh-call -- "D:\Scoop\apps\nodejs\current\node.exe" "S:\Repos\dshplugin\ClaudeCallDSH\mcp\server.mjs"
claude mcp list # dsh-call 应显示 connected移除:
claude mcp remove -s user dsh-callMCP server 每次调用都会重新读取
endpoint.json,所以 DSH 重启换了端口也不需要改配置。
工具
工具 | 作用 | 关键参数 |
| 新建 DSH 会话并派任务;默认等一会儿拿答复 |
|
| 往已有会话追加上下文 |
|
| 等下一轮结束,返回最新答复 |
|
| 不等待,读运行状态 + 最近答复 |
|
| 取消当前轮(保留队列) |
|
等待超时不会失败,而是返回 status: "running" 和 sinceSeq,让调用方用 dsh_wait 续等——
这样不会被 Claude Code 的 MCP 工具超时截断。
在 Claude Code 里可以这样说
「把
~/repo-x里那个失败的测试修一下,交给 DSH 跑」→ 它会调dsh_task,cwd指向仓库。「让 DSH 在后台整理这三份文档,你先继续」→
dsh_task+wait: false,之后再dsh_wait。「问问 DSH 那个会话进展如何」→
dsh_status。
配置项
写在 ~/.dsh/profiles/desktop/cordis.patch.yml 的 claude-call 行,全部可选:
键 | 默认值 | 说明 |
|
| 发现文件路径 |
|
| 只接受回环地址 |
|
| 0 = 内核分配;固定端口便于排查 |
| 会话默认目录 | 请求不带 |
| 部署默认 preset | 新建会话的 Agent preset |
|
| 单次 |
|
| 单次 |
| 随机 | 想固定 token(例如写自己的脚本)时用 |
HTTP 接口(给自己的脚本用)
除 health 外都要求请求头 x-claude-call-token: <endpoint.json 里的 token>。
方法与路径 | 请求体 | 返回 |
| — |
|
|
|
|
|
| 同上 |
|
|
|
| — |
|
|
|
|
测试
cd S:\Repos\dshplugin\ClaudeCallDSH
node test/bridge.test.mjs测试用一个 stub Cordis 上下文直接挂载插件,覆盖:token 认证、建会话 + 等待 + 取答复、wait:false、
wait/status 一致性、续聊、未知会话/路由、卸载时删除发现文件。不依赖运行中的 DSH。
已知限制
改插件代码后需要重启 DSH:DSH 的 Loader/Node 模块缓存不会在 profile 重组时丢弃已加载的 ESM 模块,所以
index.js的改动只有重启后生效(这是 DSH 的现有行为,不是本插件特有)。不代改权限策略:新会话沿用 DSH 当前的沙箱与审批策略;遇到需要人工 approval 的工具调用, 会话会等你在 DSH UI 里点确认。桥不会自动提权、不会把 policy 改成
never。没有流式输出:只返回轮次结束后的最终文本;过程中的工具调用细节去 DSH 会话里看。
单机、单用户:token 放在本机文件里,同机其他进程理论上可读;这是单人本机场景的取舍。
故障排查
现象 | 检查 |
MCP 报 “DSH bridge is not reachable” | DSH 是否在跑; |
HTTP 401 | 请求头 token 与 |
HTTP 404 |
|
| 会话在等人审批,或任务本身很长;用 |
改了代码没生效 | 重启 DSH Desktop |
卸载
claude mcp remove -s user dsh-call
# 在 DSH 里用 plugin_manager 移除 bundle:
# remove_bundle target = dsh-claude-call
Remove-Item -Recurse -Force "$env:USERPROFILE\.dsh\claude-call"目录
index.js Host 插件:回环 HTTP 桥 + 会话编排
mcp/server.mjs Claude Code 侧无依赖 MCP stdio server
cordis.patch.yml bundle patch(插入 claude-call 行)
locale/{en,zh}.json 插件管理器的标题与描述
icon.svg 插件图标
test/bridge.test.mjs stub 上下文下的桥集成测试Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared task layer for AI agents: tasks, handoffs and decisions that persist across tools.
Build, validate, deploy — HTTP APIs, cron jobs, webhooks and MCP tools — from your AI client.
Dispatch work to Kadmo's AI agents, read tasks and runs, edit skill packs, playbooks and routing
Capture, inspect, send and assert on webhooks and inbound email from your coding agent.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to act as a director of persistent DeepSeek Harness (DSH) workers through six tools — dsh_spawn, dsh_wait, dsh_list, dsh_kill, dsh_send, and dsh_answer — using blocking polls instead of push events.1MIT
- AlicenseNot gradedqualityBmaintenanceLets Claude Code, Codex, or any MCP client drive DeepSeek Harness as a long-lived coding agent: starting and resuming conversations, dispatching tasks in the background, streaming live output and reasoning stats, interjecting or interrupting mid-turn, handling approval prompts, and collecting results later. Sessions persist by ID, so work survives process restarts and can be handed back to a DSH GUI when needed.16MIT
- AlicenseNot gradedqualityCmaintenanceLets a Claude Code session on one Mac run tasks in Claude Code on another Mac over Tailscale. Tools start, follow, list and cancel resumable headless sessions, with token auth and allowlisted folders.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables Codex/Astra to hand off complete task packets to DSH for real execution in a shared local workspace, with progress, tool calls, questions, and results written back to a shared .astra-dsh task board. Supports blocking waits, queued follow-up instructions, interrupts, cancellation, rework requests, and independent verification or diff review of the resulting changes.1MIT