Interface McpRequestContext
-
Method Summary
Modifier and TypeMethodDescription@NonNull Class<? extends McpEndpoint> Provides the resolved endpoint class for the current request.Provides the JSON-RPC method name.Provides the JSON-RPC request ID for request-style operations.Provides the negotiated server capabilities for the request's session.Provides the high-level MCP operation type.Provides the negotiated protocol version for the request's session.Provides the transport request being handled.Provides the current session context for the request's session.Provides the MCP session ID associated with the request.
-
Method Details
-
getRequest
Provides the transport request being handled.- Returns:
- the current request
-
getEndpointClass
@NonNull Class<? extends McpEndpoint> getEndpointClass()Provides the resolved endpoint class for the current request.- Returns:
- the endpoint class
-
getJsonRpcMethod
-
getOperationType
Provides the high-level MCP operation type.- Returns:
- the operation type
-
getJsonRpcRequestId
Provides the JSON-RPC request ID for request-style operations.- Returns:
- the request ID, if available
-
getSessionId
Provides the MCP session ID associated with the request.- Returns:
- the session ID, if available
-
getProtocolVersion
Provides the negotiated protocol version for the request's session.- Returns:
- the negotiated protocol version, if available
-
getNegotiatedCapabilities
Provides the negotiated server capabilities for the request's session.- Returns:
- the negotiated capabilities, if available
-
getSessionContext
Provides the current session context for the request's session.- Returns:
- the session context, if available
-