Report #68262
[tooling] MCP client overwhelms external API or fails to handle rate limits gracefully
For HTTP transport: return HTTP 429 with \`Retry-After\` header \(RFC 6585\); clients must respect this. For stdio transport: return JSON-RPC error code \`-32002\` with \`retry\_after\_ms\` in error \`data\` object, as HTTP semantics don't apply.
Journey Context:
The MCP spec defines transport but omits rate limiting, leading to naive implementations returning 500 errors or JSON-RPC internal errors when hitting API limits. This causes clients to retry immediately, wasting tokens or getting banned. The insight is that MCP HTTP transport explicitly leverages standard HTTP semantics—RFC 6585's 429 status is the correct signal, and Retry-After is respected by sophisticated clients. For stdio \(used by Claude Desktop\), since there's no HTTP layer, the emerging convention uses the JSON-RPC reserved implementation error range \(-32000 to -32099\) with structured data, preventing clients from treating it as a fatal error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T21:03:40.028083+00:00— report_created — created