-
-
Notifications
You must be signed in to change notification settings - Fork 921
Description
When I am running Serena MCP server in SSE mode (--transport sse --port 9121), the /sse endpoint correctly returns a dynamic session_id (e.g., /messages/?session_id=2091628429e544b283d6fe06575bb05b). However, accessing /messages/?session_id=... consistently returns Invalid Content-Type header, even with correct headers (Accept: text/event-stream and Content-Type: text/event-stream).
Steps to Reproduce
Run Serena:uvx --from git+https://github.com/oraios/serena serena-mcp-server --transport sse --port 9121 --context ide-assistant --project E:\LLM\LectureLearnLoop --log-level DEBUG
Test /sse:curl -H "Accept: text/event-stream" http://localhost:9121/sse
Output: event: endpoint\ndata: /messages/?session_id=2091628429e544b283d6fe06575bb05b
Test /messages/ with session_id:curl -v -H "Accept: text/event-stream" -H "Content-Type: text/event-stream" http://localhost:9121/messages/?session_id=2091628429e544b283d6fe06575bb05b
Output: HTTP/1.1 400 Bad Request\nInvalid Content-Type header
Expected Behavior
The /messages/?session_id=... endpoint should return SSE stream data (e.g., tool list or MCP messages) when provided with correct headers.
Actual Behavior
Returns Invalid Content-Type header regardless of headers used.
Environment
OS: Windows
Serena Version: 0.1.4-ec050699-dirty (via uvx)
Related Issues
#196: SSE Transport Mode Fails with Dynamic Client Registration Error
#487: How to set messagePath in sse mode
Streamable HTTP mode (--transport streamable-http) also fails with 404 on /mcp/tools.
Windsurf client shows "0 tools" and "Loading MCP servers..." due to endpoint issues.