MCP Error Decoder
Search exact error strings and stack traces from Claude Desktop, Cursor, and OpenAI Codex CLI. Inspect root causes and copy verified terminal fixes.
JSON-RPC error -32603: Internal error (STDOUT Pollution)
Tools fail to list or fail during execution with generic error code -32603.
The MCP server wrote non-JSON debug strings to standard output (STDOUT) instead of standard error (STDERR). In stdio transport, STDOUT is strictly reserved for JSON-RPC messages; any `console.log()` breaks JSON parsing.
Switch all logging inside your custom MCP server from `console.log()` to `console.error()`. For Python servers, write logs exclusively to `sys.stderr`.
# Check MCP host logs for raw output:
tail -n 50 ~/Library/Logs/Claude/mcp.log# Check Claude logs in PowerShell:
Get-Content -Path $env:APPDATA\Claude\logs\mcp.log -Tail 50# Tail Linux MCP logs:
tail -n 50 ~/.config/Claude/logs/mcp.log// In TypeScript MCP Server:
// ❌ WRONG: console.log("Server starting...");
// ✅ CORRECT:
console.error("Server starting on stdio transport...");Architecture of Model Context Protocol Failures
MCP server issues typically stem from process isolation mismatches, stdio stream contamination, or environment inheritance limitations. Because the host AI application communicates across child-process stdio pipes or Server-Sent Events (SSE) connections, traditional browser debugging tools cannot directly capture errors.
Stdio vs. Stderr Separation
The primary rule of local MCP servers is that STDOUT belongs exclusively to the JSON-RPC wire protocol. If a server library outputs diagnostic logs, banner messages, or package notices to STDOUT, the host JSON parser crashes with an unrecoverable framing error. All server logging must route to STDERR.
GUI Subprocess Environment Isolation
Desktop GUI hosts (such as Claude Desktop or Cursor) are launched by the desktop window manager, not your shell profile (.bashrc or .zshrc). They inherit a minimal system PATH. Tools installed via nvm, pyenv, or Homebrew often require absolute binary paths in the configuration.