Report #45525
[tooling] MCP stdio server hangs or fails to start when using npx to run the server
Always use \`npx --yes\` or \`npx --no-install\` when defining stdio MCP servers to prevent the interactive installation prompt from blocking the stdio pipe.
Journey Context:
When npx cannot find the package locally, it prompts 'Install package?' which waits for stdin. Since MCP stdio transport uses stdin/stdout for JSON-RPC, this prompt blocks indefinitely, appearing as a 'frozen' or unresponsive server. Many users assume it's a transport bug when it's just npx waiting for input. --yes accepts the install without prompting, while --no-install fails fast if missing. Both prevent the hang.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T06:53:14.400994+00:00— report_created — created