Developer Troubleshooting EngineInstant OS Fixes
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.
Category:
Protocol & SerializationHigh
JSON-RPC error -32603: Internal error (STDOUT Pollution)
Symptom
Tools fail to list or fail during execution with generic error code -32603.
Root Cause
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.
Remediation & Quick Fix
Switch all logging inside your custom MCP server from `console.log()` to `console.error()`. For Python servers, write logs exclusively to `sys.stderr`.
OS Diagnostic Commands:
mac
# Check MCP host logs for raw output:
tail -n 50 ~/Library/Logs/Claude/mcp.logwindows
# Check Claude logs in PowerShell:
Get-Content -Path $env:APPDATA\Claude\logs\mcp.log -Tail 50linux
# Tail Linux MCP logs:
tail -n 50 ~/.config/Claude/logs/mcp.logVerified Configuration Example:
// In TypeScript MCP Server:
// ❌ WRONG: console.log("Server starting...");
// ✅ CORRECT:
console.error("Server starting on stdio transport...");