Skip to content

Conversation

@olaservo
Copy link
Member

@olaservo olaservo commented Feb 3, 2026

Summary

Problem

PR #513 unified the dev scripts and attempted to handle Windows stdin with:

spawnOptions.stdin = "ignore";

However, spawn-rx's stdin option expects an Observable<string>, not a string value. The library strips out the stdin option before passing it to Node's child_process.spawn, which means the setting was silently ignored. This caused tsx watch to hang waiting for stdin input on Windows.

Solution

Use Node's native stdio option instead:

spawnOptions.stdio = ["ignore", "pipe", "pipe"];

This option is passed through correctly by spawn-rx to the underlying spawn call, properly simulating the previous < NUL shell redirection behavior.

Test plan

  • Run npm run dev:windows on Windows - server and client both start successfully
  • Run npm run dev on Windows - also works (same code path)
  • Browser auto-opens with the correct URL
  • Existing tests still pass (there's a pre-existing failing test unrelated to this change)

Fixes #550

🤖 Generated with Claude Code

The `stdin: 'ignore'` option was not working because spawn-rx expects
an Observable for its stdin option, not a string. This caused tsx watch
and vite dev server to hang waiting for stdin on Windows.

Use Node's native `stdio: ['ignore', 'pipe', 'pipe']` option instead,
which spawn-rx passes through correctly to child_process.spawn.

Fixes modelcontextprotocol#550

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@olaservo olaservo merged commit fc7897f into modelcontextprotocol:main Feb 3, 2026
5 checks passed
@evalstate
Copy link
Member

Tested on PowerShell 7.5.4
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running in dev mode broken on Windows

2 participants