createmcps.com

MCP-RES-004

Accepted notification POST returns 202 with no body

“If the server accepts it, the server MUST return HTTP status code 202 Accepted with no body.” — spec anchor

How to fix this

Return HTTP 202 Accepted with an empty body when you accept a notification POST. A body on a 202, or any other status, is a violation.

Example: failing and passing

The server accepts the notification but answers 200 OK instead of 202 Accepted.
Violates MCP-RES-004 · HTTP
POST /mcp HTTP/1.1
Host: mcp.example.com
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2026-07-28
Mcp-Method: notifications/cancelled

{"jsonrpc": "2.0", "method": "notifications/cancelled",
  "params": {"requestId": 1, "reason": "User cancelled"}}

HTTP/1.1 200 OK
The server accepts the notification POST with 202 Accepted and no body; notifications/cancelled is only the validator's test message, since on Streamable HTTP a client cancels by closing the response stream.
Complies with MCP-RES-004 · HTTP
POST /mcp HTTP/1.1
Host: mcp.example.com
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2026-07-28
Mcp-Method: notifications/cancelled

{"jsonrpc": "2.0", "method": "notifications/cancelled",
  "params": {"requestId": 1, "reason": "User cancelled"}}

HTTP/1.1 202 Accepted

How the validator checks this

Probe P6.1, against a streamable-http server on the modern protocol. What it reports:

pass
Accepted notification returned 202 with no body
warn
Returned 202 but with a response body; the spec requires 202 with no body
fail
Accepted notification returned HTTP … — it must be 202 with no body
info
Rejected the notification (HTTP …). A server may legitimately not accept this notification type, so this is not scored as a failure.
skip
No response to the notification POST (…), so its handling could not be assessed

Quoted from the probe that runs this check, so it cannot drift from what the validator actually reports.

This rule is checked deterministically: a fail here is a certain violation, not an inference.

Check your own server against MCP-RES-004

Probe P6.1 checks MCP-RES-004 in a request of its own, so one run shows your server's result for this rule next to the rest. Validate a server or read how the validator works.

Background on this topic: the 2026-07-28 migration guide.

Other Result and message shape rules

  • MCP-RES-001Every result includes resultType
  • MCP-RES-002resultType is a value defined by core or an advertised extension
  • MCP-RES-003Server sends no independent JSON-RPC requests on a response stream
  • MCP-RES-005Response is application/json or text/event-stream; SSE terminates with the final response
  • MCP-RES-006SSE responses set X-Accel-Buffering: no
  • MCP-RES-007tools/list returns a deterministic order