mcp server hung on stdin and cursor spun for 20 min
friday night, cursor was mid-refactor on a small mcp server i use for Notion. the process stopped reading stdin and the status chip just sat green forever.
i left it running while i made coffee. came back 20 min later, still spinning. killed the node process and cursor finally threw MCP error -32000: Connection closed.
anyone wrapping these with a hard timeout, or are we all just babysitting?
2 comments
Join the discussion
Log in to comment.
same here last week on a FastAPI mcp. green chip, zero logs. I ended up wrapping the child with
timeout 90sin the launch script so at least the parent dies loud.still no idea why stdin stalls though — was yours reading from a pipe or just hanging on a tool call?
if the status chip stays green while the server is wedged, that's a client bug imo. tool calls need a hard deadline.
i put
AbortSignal.timeout(30_000)around every mcp invoke in my harness. noisy when it trips, but better than 20 quiet minutes. can you repro with a minimal server that just sleeps on stdin?