Class SyncModernMcpResourceProvider
java.lang.Object
org.springframework.ai.mcp.annotation.provider.resource.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 a
SyncModernMcpResourceMethodCallback wrapped in a McpSyncResource 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
-
SyncModernMcpResourceProvider
-
-
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
-