@deepseek-ai/dsh-mcp-client streamable-http transport never connects when activated as a plugin entry (fiber shows ACTIVE, zero TCP connections, silent failure; failOnStartupError: true ineffective) #314
xielforever
started this conversation in
General
Replies: 2 comments
|
我这边做了个反向的:deepseek-harness-plugin-mcp,一个 MCP server 让任意 agent 装/跑 dsh 插件,支持 stdio 和 streamable http(--http --port)。github.com/bobleer/deepseek-harness-plugin-mcp,MIT,欢迎共建。 |
0 replies
|
这个 dsh plugin --profile web add pi2dsh pi-mcp-adapter重启后由原 如果希望连管理界面一起装,可以直接使用组合套件: dsh plugin --profile web add dsh-work-x dsh-better-sidebar这是一条可立即使用的替代 MCP runtime,不代表你报告的 native |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Bug Report: dsh-mcp-client streamable-http transport hangs during plugin activation (no TCP connection, silent failure)
标题(Title)
@deepseek-ai/dsh-mcp-clientstreamable-http transport never connects when activated as a plugin entry (fiber shows ACTIVE, zero TCP connections, no error surfaced;failOnStartupError: truedoes not help)环境(Environment)
^1.12.0)web(bundles:@deepseek-ai/dsh-base+@deepseek-ai/dsh-web-app)描述(Description)
在 web profile 的
cordis.patch.yml中用streamable-http传输注册一个 MCP server 后,dsh 启动正常、插件条目 fiber 状态变为ACTIVE,但客户端从未向 MCP 端点发起任何 TCP 连接(Get-NetTCPConnection/netstat高频监控均无痕迹),工具也从未注册。整个过程无任何错误输出——即使设置failOnStartupError: true也不会报错(启动照常成功),问题被完全静默吞掉。复现步骤(Steps to Reproduce)
~/.dsh/profiles/web/cordis.patch.yml添加(insert语法):dsh --profile web --port 0(MCP 端点为可达的 HTTP 服务,curl / 独立 SDK 脚本均可正常连接)。failOnStartupError: true);Get-NetTCPConnection -RemotePort <port>持续为空(60 秒高频监控,包括 SYN_SENT/TIME_WAIT);mcp__test__*工具。期望行为(Expected)
listTools()同步工具并以mcp__<serverName>__<name>注册;连接失败时应记录日志并在failOnStartupError: true时阻止启动。实际行为(Actual)
ctx.loader.entries()可见),fiber 状态为ACTIVE(2);ctx.logger.warn/error不输出到 stdout/stderr,失败完全静默);failOnStartupError: true不生效(不报错、不阻止启动);ctx.tools.layers.global.tools.data为空)。排查证据(已排除配置/网络/服务器问题)
以下对照实验在**同一台机器、同一个 MCP 端点(可达、鉴权有效)**下进行:
Client+StreamableHTTPClientTransport直连listTools返回 15 个工具)setTimeout回调中)裸fetch端点{ capabilities: {} }、onclose、setNotificationHandler精确复刻 dsh-mcp-client 的调用方式)ctx.loader.entries()读出的完全相同 config(url + headers 与 YAML 解析一致)SDK 直连transport: stdio(本地 stdio server / bridge)streamable-http指向本地不可达端口ECONNREFUSED(说明 connect 机制与错误路径本身可用)streamable-http指向可达远程端点结论:配置语法、token、网络、MCP 服务器、SDK 本身均正常;问题特定于 dsh-mcp-client 插件实例在激活流程中以 streamable-http 连接远程端点的场景。
疑似根因(Hypothesis)
dsh-mcp-client/lib/index.js中apply为 async,注释明确说明 “Cordis treats a prototype-bearing ordinary function as a constructor, whose returned Promise is not startup work”。因此await connection.ready挂起时,fiber 仍被标记为ACTIVE,错误与挂起状态对外不可见。setTimeout回调)成功,实验 7(激活上下文)零 TCP 连接——疑似 Cordis fiber 激活的 async context 与 MCP SDK / undici fetch 的交互问题,导致请求在发出前挂起。ctx.logger输出不可见:ctx.logger.warn/error(如connection attempt failed、giving up after N attempts)不输出到 stdout/stderr,使故障完全静默,难以排查。影响(Impact)
streamable-http接入任何远程 MCP server 均静默失败,用户无法感知;stdiotransport + 本地桥接脚本转发到 HTTP 端点(已验证可行)。建议(Suggested Fix)
apply返回的 Promise(或显式区分构造函数/异步 apply),使挂起/失败能反映到 fiber 状态(如 LOADING/FAILED);failOnStartupError覆盖“连接挂起/超时”场景(增加连接超时,如复用 SDK 的 60s 默认或暴露connectTimeoutMs配置);ctx.logger至少应输出到 stdout/stderr 或提供可配置的日志出口。附加信息
All reactions