Class AsyncStatelessMcpResourceProvider

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

public class AsyncStatelessMcpResourceProvider extends Object
Provider for asynchronous 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 and return reactive types.
Author:
Christian Tzolov
  • Constructor Details

    • AsyncStatelessMcpResourceProvider

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

    • getResourceSpecifications

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

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

      protected Method[] doGetClassMethods(Object bean)
    • doGetMcpResourceAnnotation

      protected McpResource doGetMcpResourceAnnotation(Method method)