java-sdk/mcp
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Yanming Zhou d8cc189341 fix: Add null check for response ID to prevent memory leaks
- Check if response.id() is not null before processing in MCP session classes
- Log error when MCP response lacks session ID to warn about potential memory leaks
- Improve error handling in McpStreamableServerSession with proper error codes

The missing null check could lead to memory leaks as pending requests
would never be completed when responses lack session IDs. This fix ensures
proper handling of such cases with appropriate error logging.

Resolves #506

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-09-08 13:09:56 +02:00
..
src fix: Add null check for response ID to prevent memory leaks 2025-09-08 13:09:56 +02:00
pom.xml Next development version 2025-09-04 22:33:14 +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.