java-sdk/mcp
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
..
src feat: implement MCP-compliant keep-alive functionality for server transports 2025-07-30 20:40:31 +02:00
pom.xml feat: add structured output support for MCP tools (#357) 2025-07-13 15:29:56 +02:00
README.md clean the Readme 2025-02-13 20:44:34 +01:00

Java MCP SDK

Java SDK implementation of the Model Context Protocol, enabling seamless integration with language models and AI tools. For comprehensive guides and API documentation, visit the MCP Java SDK Reference Documentation.