Class AsyncMcpCompleteProvider

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

public class AsyncMcpCompleteProvider extends Object
Provider for asynchronous MCP complete methods. This provider creates completion specifications for methods annotated with McpComplete that return reactive types and work with McpAsyncServerExchange.
Author:
Christian Tzolov
  • Constructor Details

    • AsyncMcpCompleteProvider

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

    • getCompleteSpecifications

      public List<io.modelcontextprotocol.server.McpServerFeatures.AsyncCompletionSpecification> getCompleteSpecifications()
      Get the async completion specifications.
      Returns:
      the list of async 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