mcp Async Clients
Creates a list of McpAsyncClient instances based on the available transports.
This method overrides the base Spring AI implementation to add exception handling during client initialization. Clients that fail to initialize are logged and excluded from the returned list, allowing the application to start with partially available MCP functionality rather than failing completely.
Each successfully configured client includes:
- Client information (name and version) from common properties
- Request timeout settings
- Custom configurations through McpAsyncClientConfigurer
- Handler registrations for sampling, elicitation, logging, progress, and resource changes
If initialization is enabled in properties, the clients are automatically initialized with error resilience using reactive blocking.
Return
list of successfully initialized MCP async clients (may be empty if all fail)
Parameters
the configurer for customizing client creation
common MCP client properties
provider of named MCP transports
registry for client-side asynchronous handlers