A Streamable HTTP server written for 2026-07-28 receives a POST whose method is a vendor RPC it does not implement. The client needs to distinguish this from hitting an old HTTP+SSE server that simply lacks the modern endpoint. How should the server respond?
Select an answer to reveal the explanation.
Short Explanation
Both servers might say "404," but only the modern one explains why in the body: -32601, method not found. That body is your clue that the server is alive and modern. The trap is 405, which is for GET and DELETE, not unknown methods.
Full Explanation
The Streamable HTTP transport says that if a server does not implement the requested RPC method, it must respond with 404 Not Found and a JSON-RPC error with code -32601, Method not found. The JSON-RPC error body is what distinguishes this case from a bare 404 returned by a legacy HTTP+SSE server that does not host the modern MCP endpoint at all, which matters for clients that probe for the server's protocol era. A 405 Method Not Allowed is the recommended response when a modern-only server receives HTTP GET or DELETE from an older client; it concerns the HTTP verb, not the JSON-RPC method, and an empty body would remove the very signal the client needs. HeaderMismatch, -32020, means the Mcp-Method header disagrees with the body or a required header is missing; an unknown but consistently stated method is not a mismatch. Returning 200 with an empty body would tell the client nothing and break JSON-RPC, since every request must receive a result or an error. Exam caveat: on stdio there is no HTTP status, so the same failure is just the -32601 error. Operational check: POST an unimplemented method to the endpoint and confirm the status is 404 and the body is a JSON-RPC error with code -32601.