SSE endpoints not working in network mode - only HTTP endpoint functional #13
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
SSE Endpoints Not Working in Network Mode
Issue Description
In network mode, the HTTP endpoint (
/mcp) works perfectly but the SSE endpoints (/sseand/message) return 404 errors. This prevents achieving the goal of having both HTTP and SSE transports on a single port.Current Status
✅ Working: HTTP endpoint at
/mcpwith proper session management❌ Not Working: SSE endpoints at
/sseand/messageEnvironment
networkWorking HTTP Endpoint Test
Failing SSE Endpoint Tests
Current Implementation
Attempted Solutions
1. Direct SSE Server Mounting
Result: Still 404 on
/sse/sseand/sse/message2. Custom SSE Endpoint Configuration
Result: Still 404 on both endpoints
3. Default SSE Server with Handler Mounting
Result: Still 404 on both endpoints
Server Binding Confirmation
/mcpwork perfectly/sseand/messagereturn 404Analysis
The issue appears to be related to how the SSE handlers are being mounted or configured. The mcp-go SSE server expects specific routing that may not be compatible with custom mux mounting.
Investigation Areas
Workaround
Currently, users can use the HTTP endpoint (
/mcp) which is fully functional with session management. However, this doesn't achieve the goal of having both transports available.Next Steps
Files Modified
operation/operation.go(network mode implementation)TESTING.md(documentation of endpoints)Priority
Medium - HTTP endpoint works, but full network mode functionality requires both transports
This issue is now resolved. The
networkmode has been updated to correctly handle both HTTP and SSE transports on a single port. Theoperation/operation.gofile was modified to properly initialize and route the SSE server endpoints (/sseand/message), which were previously returning 404 errors. Both transport methods are now fully functional innetworkmode.