Class AsyncStatelessMcpCompleteProvider

java.lang.Object
org.springaicommunity.mcp.provider.complete.AsyncStatelessMcpCompleteProvider

public class AsyncStatelessMcpCompleteProvider extends Object
Provider for asynchronous stateless MCP complete methods. This provider creates completion specifications for methods annotated with McpComplete that are designed to work in a stateless manner using McpTransportContext and return reactive types.
Author:
Christian Tzolov
  • Constructor Details

    • AsyncStatelessMcpCompleteProvider

      public AsyncStatelessMcpCompleteProvider(List<Object> completeObjects)
      Create a new AsyncStatelessMcpCompleteProvider.
      Parameters:
      completeObjects - the objects containing methods annotated with McpComplete
  • Method Details

    • getCompleteSpecifications

      public List<io.modelcontextprotocol.server.McpStatelessServerFeatures.AsyncCompletionSpecification> getCompleteSpecifications()
      Get the async stateless completion specifications.
      Returns:
      the list of async stateless completion specifications
    • doGetClassMethods

      protected Method[] doGetClassMethods(Object bean)
      Returns the methods of the given bean class.
      Parameters:
      bean - the bean instance
      Returns:
      the methods of the bean class