Class AsyncModernMcpResourceProvider
java.lang.Object
org.springframework.ai.mcp.annotation.provider.resource.AsyncModernMcpResourceProvider
The asynchronous twin of
SyncModernMcpResourceProvider: creates resource and
resource template registrations for a 2026-07-28 ("modern") MCP server from methods
annotated with McpResource. Each method is served by an
AsyncModernMcpResourceMethodCallback wrapped in a McpAsyncResource that
requires the client capabilities listed in McpResource.requiredCapabilities().- Since:
- 2.1.0
- Author:
- Christian Tzolov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Method[]doGetClassMethods(Object bean) protected McpResourcedoGetMcpResourceAnnotation(Method method) voidsetJsonMapper(@Nullable io.modelcontextprotocol.json.McpJsonMapper jsonMapper) Sets the mapper the resource methods convert their MRTR input responses with, normally the server's.
-
Constructor Details
-
AsyncModernMcpResourceProvider
-
-
Method Details
-
setJsonMapper
public void setJsonMapper(@Nullable io.modelcontextprotocol.json.McpJsonMapper jsonMapper) Sets the mapper the resource methods convert their MRTR input responses with, normally the server's. Unset, the SDK default is used. -
getResources
-
getResourceTemplates
-
doGetClassMethods
-
doGetMcpResourceAnnotation
-