MCP stdio servers use stdout for the JSON-RPC protocol itself. A single stray print() or console.log() writes into that stream and corrupts every message after it — and the failure is silent.
Paste your server code below. This finds every line that would break it.
✓ Your code never leaves your browser. There is no server, no upload, no logging.
The stdout leak is one of three failure modes that break MCP servers in production. The other two are connections dropping mid-session with no recovery, and servers that accept a connection but never actually respond — a 2026 analysis of 2,100+ endpoints found 52% were dead in exactly that way. The MCP Server Reliability Kit is three tested modules covering all three, including a logger that cannot write to stdout by construction.
MCP Server Reliability Kit — $59Logging to stdout is the default debugging reflex in every language. In almost every other kind of program it is harmless. In an MCP stdio server it is a protocol violation, because stdout is the transport — the client is parsing that stream as JSON-RPC messages.
What makes it costly is that it fails quietly. The server starts, the connection opens, and everything looks fine until the first log line lands in the middle of a message. Then the client sees malformed JSON and the session breaks in a way that points nowhere near the actual cause.
The fix is always the same: write logs to stderr, never stdout. Stderr is not part of the protocol stream, so anything you put there is safe.