Repository navigation
Replies: 1 comment
|
Nice diagnosis. Until the transport gets a shell option, this workaround should get you going today. Workaround: launch - id: mcp-netcatty-external
name: '@deepseek-ai/dsh-mcp-client'
config:
transport: stdio
serverName: netcatty-external
command: C:\Windows\System32\cmd.exe
args:
- /d
- /s
- /c
- D:\Netcatty\resources\app.asar.unpacked\electron\cli\netcatty-external-mcp.cmd
env:
NETCATTY_EXTERNAL_MCP_DISCOVERY_FILE: C:\Users\<user>\AppData\Roaming\netcatty\external-mcp\discovery.jsonWhy it works
Things to watch
Alternative
For the real fix
|
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.
Environment
0.2.2-rc.3(Windows 11 x64, Node inside the Electron host:v24.21.0/ Electron44.7.0)@deepseek-ai/dsh-mcp-client.cmdlauncher as the documented MCP entry point, and that same entry works in other MCP clients (Codex / Claude) on the same machineConfig
Symptoms
mcp-client(netcatty-external): server is disconnectedEINVAL, nospawnfailure, no exit code is ever shown to the caller — the real startup error only reachesctx.logger.warn(${label}: connection attempt failed: ...)..execommand,npxcommand) connects fine, so this is specific to a.cmdcommand.Root cause
packages/mcp/mcp-clientbuilds the transport with no shell option:and
@modelcontextprotocol/client'sStdioClientTransport.start()spawns withshell: false:Since the Node CVE-2024-27980 fix, Node refuses to
spawn()a.cmd/.batwithout a shell and throwsEINVAL. The transport rejects,record.connectedAtstaysundefined, and every later request throws${label}: server is disconnected.This is the same class as #12878 (
resolveExecutablereturning.cmd/.batthat the launch paths cannot run), but on the mcp-client stdio transport path rather than the subprocess seam —StdioClientTransportowns thespawnthere, soresolveExecutablenever sees it.Evidence (reproduced on the reporting machine)
command: C:\\Windows\\System32\\cmd.exe,args: ['/c', '<...>.cmd']through the same transport works: initialize + 15 tools + a successful tool call.Secondary issue: the startup error is invisible
startupTimeoutMs/ reconnect diagnostics only go toctx.logger; the caller-visible error is always theserver is disconnectedstring. A one-line summary of the last startup failure (here:spawn EINVAL) in the public error would have made this self-diagnosing. Related: #10548 raised the same opacity for a different startup failure.Suggested fix
In
createTransport(stdio branch), special-case Windows batch shims:(Arguments must be cmd-safe-escaped, or prefer an
.exe/node <script>shim when one exists.) At minimum, document the limitation in the mcp-client README with a known-good Windows template.Workaround
Users can wrap the command themselves in the profile's
cordis.patch.yml, but note that when the MCP entry is generated by a config manager (cc-switch in this case) the patch gets rewritten on every sync — the home-level$DSH_HOME/cordis.patch.ymllayer, applied after the profile layer, survives it:Filed from a DSH session after a full read-only diagnosis; the
.cmdspawn behaviour was reproduced on the reporting machine, not inferred.All reactions