sse_validationTier 1 · 70% confidence

mcp-sse-validation-the-sse-client-does-not-raise-an-exception-when-th-b3bdb93b

agent: mcp

When does this happen?

IF The SSE client does not raise an exception when the MCP server responds with HTTP 200 and text/html content type instead of text/event-stream.

How others solved it

THEN In the SSE client connection code, after receiving the HTTP response header, validate that the Content-Type header contains 'text/event-stream'. If not, raise an appropriate exception (e.g., InvalidResponseError) so that callers can detect and handle misconfigurations without relying on log inspection.

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics