Interface McpRequestInterceptor
MCP-side analogue of HTTP
RequestInterceptor.- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> @Nullable TinterceptRequest(@NonNull McpRequestContext context, @NonNull McpHandlerInvocation<T> invocation) Intercepts an MCP JSON-RPC request before Soklet dispatches it to framework or application logic.
-
Method Details
-
interceptRequest
default <T> @Nullable T interceptRequest(@NonNull McpRequestContext context, @NonNull McpHandlerInvocation<T> invocation) throws Exception Intercepts an MCP JSON-RPC request before Soklet dispatches it to framework or application logic.- Type Parameters:
T- the invocation result type- Parameters:
context- the current request contextinvocation- the invocation callback to continue processing- Returns:
- the invocation result
- Throws:
Exception- if interception or downstream handling fails
-