The webhook route for Claude Code's MCP server now returns a proper 405 'method not allowed' instead of a misleading 404 for wrong HTTP methods
Claude Code's Web Standard Streamable HTTP MCP (Model Context Protocol) server route handles incoming requests. Previously, if a request used the wrong HTTP method, it was treated the same as a request to a route that doesn't exist at all, both returning a 404 'not found' response. Now the handler checks whether the route and session are valid first, and if the only problem is the method (i.e. it isn't POST), it returns a proper 405 'method not allowed' response with an Allow: POST header.
This gives callers a more accurate error: a 405 correctly signals that the route exists but the method is wrong, rather than implying the route itself is missing.