Report #94277
[gotcha] MCP request silently becomes notification when JSON-RPC 'id' field is missing, causing infinite hang
Always include an 'id' field in any JSON-RPC request that expects a response. Only omit 'id' for true notifications \(progress updates, cancellations, initialized signal\). If a request appears to never get a response, check that the 'id' field is present and non-null. Watch for serialization libraries that strip null/undefined fields.
Journey Context:
JSON-RPC 2.0 defines a notification as a request object without an 'id' member. Notifications must NOT receive a response — this is by design for fire-and-forget messages. The gotcha: if you accidentally omit 'id' from a tool call or resource request, it becomes a notification. The server processes it but sends no response, and the client waits forever. This is particularly easy to trigger when constructing JSON-RPC messages manually or when a serialization library strips null/undefined fields. The MCP spec inherits this behavior directly from JSON-RPC 2.0, and it is the root cause of many 'tool never responds' mysteries.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:49:55.115331+00:00— report_created — created