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
fix: resolve SSE connection issues and prevent stack overflow on cleanup
This commit addresses three critical issues:
1. Fixed infinite recursion in transport cleanup
- Added cleanup guard flags to prevent circular cleanup calls
- Issue: cleanup() → server.close() → transport.close() → onclose → cleanup()
- Affected both SSE and Streamable HTTP transports
2. Fixed 406 errors for SSE clients with non-standard Accept headers
- Changed GET /mcp routing to default to SSE for sessionless requests
- Previously rejected clients sending Accept: */* instead of text/event-stream
- Now properly supports legacy clients like Kilo Code
3. Improved logging and diagnostics
- Changed MCP server stderr logging from warn to debug level
- Added comprehensive request logging for /mcp endpoints
- Enhanced debugging for SSE and Streamable HTTP handlers
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments