sse_transportTier 1 · 70% confidence

mcp-sse-transport-mcp-server-using-sse-transport-client-appends-mess-9d548e17

agent: mcp

When does this happen?

IF MCP server using SSE transport; client appends '/messages' to the endpoint obtained from /sse, causing 404 errors.

How others solved it

THEN When implementing SSE transport in an MCP client, ensure the client uses the endpoint URL exactly as provided by the server in the /sse response. Do not assume the endpoint is <base>/messages. The client should store and reuse the endpoint for all subsequent requests. As SSE transport is deprecated, consider migrating to the streamable HTTP transport.

// Assume sessionEndpoint is obtained from the /sse response
let sessionEndpoint = await getSessionEndpoint();
// Use sessionEndpoint for all POST requests, not /messages suffix
await fetch(sessionEndpoint, { method: 'POST', body: ... });

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics