java-sdk/mcp-spring
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Christian Tzolov ee2c891cca feat: implement MCP-compliant keep-alive functionality for server transports
- Add KeepAliveScheduler utility class for configurable periodic session pings
- Integrate keep-alive support in WebFlux, WebMVC, and HttpServlet SSE transport providers
- Add keepAliveInterval configuration option to all transport provider builders
- Deprecate existing constructors in favor of builder pattern with enhanced configuration
- Update graceful shutdown to properly clean up keep-alive schedulers
- Add unit tests for KeepAliveScheduler functionality

Implements MCP specification recommendations for connection health detection:
- Configurable ping frequency to suit different network environments
- Optional keep-alive (disabled by default) to avoid excessive network overhead
- Proper resource cleanup to prevent connection leaks

https://modelcontextprotocol.io/specification/2025-06-18/basic/utilities/ping#implementation-considerations

Resolves: #414, #158
Replaces #353

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-07-30 20:40:31 +02:00
..
mcp-spring-webflux feat: implement MCP-compliant keep-alive functionality for server transports 2025-07-30 20:40:31 +02:00
mcp-spring-webmvc feat: implement MCP-compliant keep-alive functionality for server transports 2025-07-30 20:40:31 +02:00