Package io.modelcontextprotocol.server
Interface McpStatelessServerHandler
public interface McpStatelessServerHandler
Handler for MCP requests and notifications in a Stateless Streamable HTTP Server
context.
- Author:
- Dariusz Jędrzejczyk
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>handleNotification(McpTransportContext transportContext, McpSchema.JSONRPCNotification notification) Handle the notification.reactor.core.publisher.Mono<McpSchema.JSONRPCResponse>handleRequest(McpTransportContext transportContext, McpSchema.JSONRPCRequest request) Handle the request using user-provided feature implementations.
-
Method Details
-
handleRequest
reactor.core.publisher.Mono<McpSchema.JSONRPCResponse> handleRequest(McpTransportContext transportContext, McpSchema.JSONRPCRequest request) Handle the request using user-provided feature implementations.- Parameters:
transportContext-McpTransportContextcarrying transport layer metadatarequest- the request JSON object- Returns:
- Mono containing the JSON response
-
handleNotification
reactor.core.publisher.Mono<Void> handleNotification(McpTransportContext transportContext, McpSchema.JSONRPCNotification notification) Handle the notification.- Parameters:
transportContext-McpTransportContextcarrying transport layer metadatanotification- the notification JSON object- Returns:
- Mono that completes once handling is finished
-