You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP SSE transport ignores the server's endpoint event and POSTs to a guessed URL, so standard SSE servers fail to connect #508
The sse MCP transport cannot connect to standard MCP SSE servers. It guesses the POST URL with self.url.replace("/sse", "/message") instead of using the endpoint the server announces, so requests go to a URL that does not exist and connect() fails after a 30s timeout.
Cause
In agent_core/core/impl/mcp/server.py, SSETransport:
The MCP SSE spec says the server's first event is event: endpoint, whose data is the URL JSON-RPC requests must be POSTed to. _listen_sse never reads it (it only parses data: lines as JSON, so the endpoint line is dropped).
send_request then POSTs to self.url.replace("/sse", "/message"). The official Python SDK serves GET /sse and POST /messages/?session_id=..., so the guess is /message (no s, no session) and returns 404.
Unlike the stdio and websocket transports, it never sends notifications/initialized after initialize.
Reproduction
Server: official MCP Python SDK (mcp==1.30.0), FastMCP(...).run(transport="sse") with one tool. Client: CraftBot's MCPServerConnection with MCPServerConfig(name="official", transport="sse", url="http://127.0.0.1:8771/sse").
CraftBot:
CraftBot MCPServerConnection.connect() -> False in 30.1s
SSE initialize failed: {'code': -1, 'message': 'Request timeout'}
server log:
"POST /message HTTP/1.1" 404 Not Found
"GET /sse HTTP/1.1" 200 OK
Control, the official SDK client against the same server:
official client OK, tools: ['add']
"GET /sse HTTP/1.1" 200 OK
"POST /messages/?session_id=a5ad5e8a... HTTP/1.1" 202 Accepted (x3)
So the server is fine; the difference is the URL CraftBot POSTs to.
Expected
The transport POSTs to the endpoint announced in the server's endpoint event and sends notifications/initialized.
Notes
Only affects servers added with transport: "sse"; stdio servers are unaffected.
Activity
fix: use the endpoint announced by MCP SSE servers
fix: use the endpoint announced by MCP SSE servers
fix: use the endpoint announced by MCP SSE servers (#509)
Release v1.4.5: New terminal UI, upgraded Agent Apps, and startup fix…
Release v1.4.5: New terminal UI, upgraded Agent Apps, and startup fix…