Class SyncStatelessMcpResourceProvider

java.lang.Object
org.springaicommunity.mcp.provider.resource.SyncStatelessMcpResourceProvider

public class SyncStatelessMcpResourceProvider extends Object
Provider for synchronous stateless MCP resource methods. This provider creates resource specifications for methods annotated with McpResource that are designed to work in a stateless manner using McpTransportContext.
Author:
Christian Tzolov
  • Constructor Details

    • SyncStatelessMcpResourceProvider

      public SyncStatelessMcpResourceProvider(List<Object> resourceObjects)
      Create a new SyncStatelessMcpResourceProvider.
      Parameters:
      resourceObjects - the objects containing methods annotated with McpResource
  • Method Details

    • getResourceSpecifications

      public List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncResourceSpecification> getResourceSpecifications()
      Get the stateless resource specifications.
      Returns:
      the list of stateless resource specifications
    • getResourceTemplateSpecifications

      public List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncResourceTemplateSpecification> getResourceTemplateSpecifications()
    • doGetClassMethods

      protected Method[] doGetClassMethods(Object bean)
    • doGetMcpResourceAnnotation

      protected McpResource doGetMcpResourceAnnotation(Method method)