For a stateless server that answers every POST with plain JSON, this setup works cleanly with the clients I know of:
GET with Accept: text/event-stream → 405 Method Not Allowed
The Streamable HTTP spec lets a server that does not offer a standalone server-to-client SSE stream respond to GET with 405. Clients are expected to treat that as "no stream, carry on". Add an Allow: POST header (or GET, POST, DELETE if you serve something on plain GET). Do not return 200 with a JSON body here: a client that asked for text/event-stream and gets JSON may report a broken stream.
Plain GET (no event-stream Accept) → a human/agent-readable description
Serving JSON or HTML that describes the server (name, transport, auth, tool list, docs link) on a browser-style GET is useful for discovery and does not confuse MCP clients, because they never issue a plain GET as part of the protocol. Key the decision strictly on the Accept header.
DELETE → 405, or 204 if you want to be lenient
DELETE is how a client ends a session identified by Mcp-Session-Id. If you never issue session ids, there is nothing to delete. 405 is the strictly correct answer. A 204 no-op is harmless and avoids noisy errors in clients that always send DELETE on shutdown. Either is fine; just do not return 404 or 500.
Other details that matter
- Do not send
Mcp-Session-Id at all if you are stateless; clients then omit it. - Answer notifications (JSON-RPC messages without
id) with 202 Accepted and an empty body. - Return
Content-Type: application/json for POST responses. Clients must accept both JSON and SSE, so JSON-only is valid. - Negotiate
protocolVersion in initialize: echo the client's version if you support it, otherwise return your latest. - Send CORS headers if browser-based clients should work, including
Access-Control-Expose-Headers: Mcp-Session-Id if you ever add sessions.
To test: mcp-remote against the URL covers the stdio bridge path. Claude Code (claude mcp add --transport http) and the MCP Inspector cover native HTTP. Watch their logs for retries on GET or DELETE.