Class McpSyncClientConfigurer

java.lang.Object
org.springframework.ai.mcp.client.autoconfigure.configurer.McpSyncClientConfigurer

public class McpSyncClientConfigurer extends Object
Configurer class for customizing MCP synchronous clients.

This class manages a collection of McpSyncClientCustomizer instances that can be applied to customize the configuration of MCP synchronous clients during their creation.

The configurer applies customizations in the order they are registered, allowing for sequential modifications to the client specifications.

See Also:
  • McpSyncClientCustomizer
  • McpClient.SyncSpec
  • Constructor Summary

    Constructors
    Constructor
    Description
    McpSyncClientConfigurer(List<org.springframework.ai.mcp.customizer.McpSyncClientCustomizer> customizers)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.modelcontextprotocol.client.McpClient.SyncSpec
    configure(String name, io.modelcontextprotocol.client.McpClient.SyncSpec spec)
    Configures an MCP sync client specification by applying all registered customizers.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • McpSyncClientConfigurer

      public McpSyncClientConfigurer(List<org.springframework.ai.mcp.customizer.McpSyncClientCustomizer> customizers)
  • Method Details

    • configure

      public io.modelcontextprotocol.client.McpClient.SyncSpec configure(String name, io.modelcontextprotocol.client.McpClient.SyncSpec spec)
      Configures an MCP sync client specification by applying all registered customizers.
      Parameters:
      name - the name of the client being configured
      spec - the specification to customize
      Returns:
      the customized specification