Interface McpService
- All Known Implementing Classes:
DefaultMcpService, McpService.DummyMcpService
public interface McpService
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionstatic McpServiceget()<T> McpClientBuilder<T> mcpBuilder(Supplier<Object> mcpClientSupplier, Class<?> mcpClientType, Class<T> agentServiceClass) Creates the builder of an MCP client agent.methodToAgentExecutor(InternalAgent mcpClient, Method method)
-
Method Details
-
mcpBuilder
<T> McpClientBuilder<T> mcpBuilder(Supplier<Object> mcpClientSupplier, Class<?> mcpClientType, Class<T> agentServiceClass) Creates the builder of an MCP client agent. The supplier returns theMcpClientand is invoked when the client is first needed, on the first invocation of the agent, because creating a client normally connects to the MCP server. Its declared return type is checked now, when the agent is built: it must be anMcpClient, a subtype, or a supertype such asObject, in which case the instance returned is checked when the client is created.- Parameters:
mcpClientSupplier- the supplier of the client, wrapping the@McpClientSuppliermethodmcpClientType- the declared return type of that methodagentServiceClass- the interface of the agent
-
methodToAgentExecutor
-
get
-