Interface McpClientCustomizer<B>

Type Parameters:
B - the type of the MCP component to customize, e.g. McpClient.SyncSpec or HttpClientStreamableHttpTransport.Builder
All Known Implementing Classes:
McpAsyncToolsChangeEventEmmiter, McpSyncToolsChangeEventEmmiter

public interface McpClientCustomizer<B>
Interface for customizing MCP client components.

This interface allows for customization of MCP client components, such as clients or transports, through Spring's customizer pattern. Implementations can modify the component's configuration before it is used in the application.

Use for example McpCustomizer<McpClient.SyncSpec> for clients (here, synchronous), or McpCustomizer<HttpClientStreamableHttpTransport.Builder> for transports (here, HttpClient Streamable HTTP).

Since:
2.0.0
Author:
Daniel Garnier-Moiroux
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    customize(String name, B componentBuilder)
    Customizes an MCP client component.
  • Method Details

    • customize

      void customize(String name, B componentBuilder)
      Customizes an MCP client component.

      This method is called for each MCP component being created, allowing for component-specific customizations based on the component's name.

      Parameters:
      name - the name of the MCP component being customized
      componentBuilder - the component to customize