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
Ensure that server sends notifications only to initialized clients with appropriate capabilities
Expected Behavior
Send notifications only to initialized clients
For client initiated request/response operations (e.g. all server features) return a single response only to the client-session that has initiated the request.
Send Root and Sampling requests only to the client that initiated the current session and only if they provide those capabilities
Current Behavior
Server broadcasts notifications and requests without checking:
Client initialization state
Client capabilities
Session ownership
The text was updated successfully, but these errors were encountered:
This commit introduces a major refactoring of the MCP Java SDK to implement a session-based architecture
for server-side implementations. The changes improve the SDK's ability to handle multiple concurrent
client connections and provide an API better aligned with the MCP specification.
Key changes:
- Introduce McpServerTransportProvider interface to manage client connections
- Rename ClientMcpTransport to McpClientTransport and ServerMcpTransport to McpServerTransport
- Add exchange objects (McpAsyncServerExchange, McpSyncServerExchange) for client interaction
- Update handler signatures to include exchange parameter: (args) -> result to (exchange, args) -> result
- Rename Registration classes to Specification classes
- Update method names (e.g., rootsChangeConsumers to rootsChangeHandlers)
- Deprecate old interfaces and classes for removal in 0.9.0
- Add migration guide (migration-0.8.0.md)
Resolves#9, #15
Co-authored-by: Dariusz Jędrzejczyk <[email protected]>
Signed-off-by: Christian Tzolov <[email protected]>
This commit introduces a major refactoring of the MCP Java SDK to implement a session-based architecture
for server-side implementations. The changes improve the SDK's ability to handle multiple concurrent
client connections and provide an API better aligned with the MCP specification.
Key changes:
- Introduce McpServerTransportProvider interface to manage client connections
- Rename ClientMcpTransport to McpClientTransport and ServerMcpTransport to McpServerTransport
- Add exchange objects (McpAsyncServerExchange, McpSyncServerExchange) for client interaction
- Update handler signatures to include exchange parameter: (args) -> result to (exchange, args) -> result
- Rename Registration classes to Specification classes
- Update method names (e.g., rootsChangeConsumers to rootsChangeHandlers)
- Deprecate old interfaces and classes for removal in 0.9.0
- Add migration guide (migration-0.8.0.md)
Resolves#9, #15
Co-authored-by: Christian Tzolov <[email protected]>
Signed-off-by: Christian Tzolov <[email protected]>
Ensure that server sends notifications only to initialized clients with appropriate capabilities
Expected Behavior
Current Behavior
Server broadcasts notifications and requests without checking:
The text was updated successfully, but these errors were encountered: