norboten · cheat sheet

The Server That Talks Too Much — on stdio, stdout belongs to the protocol — cheat sheet

mcp, logging-journald
<command> 2>/dev/null < requests.jsonl          # stdout exactly as the client reads it
<command> 2>&1 >/dev/null < requests.jsonl      # only what went to stderr
python3 -c 'import json,sys; [json.loads(l) for l in sys.stdin]'   # fails on the first bad line
printf '...' >&2                                # a wrapper's messages, on stderr
claude --debug                                  # Claude Code's own view of MCP start-up