Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- addMcpClient(McpSyncClient) - Method in class org.springframework.ai.mcp.SyncMcpToolCallbackProvider.Builder
-
Adds an MCP client to the existing list.
- AsyncMcpToolCallback - Class in org.springframework.ai.mcp
-
Adapts MCP tools to Spring AI's
ToolCallbackinterface with asynchronous execution. - AsyncMcpToolCallback(McpAsyncClient, McpSchema.Tool) - Constructor for class org.springframework.ai.mcp.AsyncMcpToolCallback
-
Deprecated.
- AsyncMcpToolCallback.Builder - Class in org.springframework.ai.mcp
-
Builder for constructing AsyncMcpToolCallback instances.
- AsyncMcpToolCallbackProvider - Class in org.springframework.ai.mcp
-
Provides MCP tools asynchronously from multiple MCP servers as Spring AI tool callbacks.
- AsyncMcpToolCallbackProvider(McpAsyncClient...) - Constructor for class org.springframework.ai.mcp.AsyncMcpToolCallbackProvider
-
Deprecated.use
AsyncMcpToolCallbackProvider.builder()instead - AsyncMcpToolCallbackProvider(List) - Constructor for class org.springframework.ai.mcp.AsyncMcpToolCallbackProvider
-
Deprecated.use
AsyncMcpToolCallbackProvider.builder()instead - AsyncMcpToolCallbackProvider(McpToolFilter, McpAsyncClient...) - Constructor for class org.springframework.ai.mcp.AsyncMcpToolCallbackProvider
-
Deprecated.use
AsyncMcpToolCallbackProvider.builder()instead - AsyncMcpToolCallbackProvider(McpToolFilter, List) - Constructor for class org.springframework.ai.mcp.AsyncMcpToolCallbackProvider
-
Deprecated.use
AsyncMcpToolCallbackProvider.builder()instead - AsyncMcpToolCallbackProvider.Builder - Class in org.springframework.ai.mcp
-
Builder for
AsyncMcpToolCallbackProviderconfiguration. - asyncToolCallbacks(List) - Static method in class org.springframework.ai.mcp.AsyncMcpToolCallbackProvider
-
Creates a reactive stream of tool callbacks from multiple MCP clients.
B
- build() - Method in class org.springframework.ai.mcp.AsyncMcpToolCallback.Builder
-
Builds an AsyncMcpToolCallback with the configured parameters.
- build() - Method in class org.springframework.ai.mcp.AsyncMcpToolCallbackProvider.Builder
- build() - Method in class org.springframework.ai.mcp.McpConnectionInfo.Builder
-
Builds and returns a new McpConnectionInfo instance with the configured values.
- build() - Method in class org.springframework.ai.mcp.SyncMcpToolCallback.Builder
-
Builds a
SyncMcpToolCallbackwith the configured parameters. - build() - Method in class org.springframework.ai.mcp.SyncMcpToolCallbackProvider.Builder
-
Builds the provider with configured parameters.
- builder() - Static method in class org.springframework.ai.mcp.AsyncMcpToolCallback
-
Creates a builder for constructing AsyncMcpToolCallback instances.
- builder() - Static method in class org.springframework.ai.mcp.AsyncMcpToolCallbackProvider
-
Creates a builder for constructing provider instances.
- builder() - Static method in record class org.springframework.ai.mcp.McpConnectionInfo
-
Creates a new Builder instance for constructing McpConnectionInfo.
- builder() - Static method in class org.springframework.ai.mcp.SyncMcpToolCallback
-
Creates a builder for constructing
SyncMcpToolCallbackinstances. - builder() - Static method in class org.springframework.ai.mcp.SyncMcpToolCallbackProvider
-
Creates a builder for constructing provider instances.
- Builder() - Constructor for class org.springframework.ai.mcp.AsyncMcpToolCallback.Builder
- Builder() - Constructor for class org.springframework.ai.mcp.SyncMcpToolCallback.Builder
- Builder() - Constructor for class org.springframework.ai.mcp.SyncMcpToolCallbackProvider.Builder
C
- call(String) - Method in class org.springframework.ai.mcp.AsyncMcpToolCallback
- call(String) - Method in class org.springframework.ai.mcp.SyncMcpToolCallback
- call(String, ToolContext) - Method in class org.springframework.ai.mcp.AsyncMcpToolCallback
- call(String, ToolContext) - Method in class org.springframework.ai.mcp.SyncMcpToolCallback
- clientCapabilities() - Method in record class org.springframework.ai.mcp.McpConnectionInfo
-
Returns the value of the
clientCapabilitiesrecord component. - clientCapabilities(McpSchema.ClientCapabilities) - Method in class org.springframework.ai.mcp.McpConnectionInfo.Builder
-
Sets the client capabilities.
- clientInfo() - Method in record class org.springframework.ai.mcp.McpConnectionInfo
-
Returns the value of the
clientInforecord component. - clientInfo(McpSchema.Implementation) - Method in class org.springframework.ai.mcp.McpConnectionInfo.Builder
-
Sets the client information.
- convert(ToolContext) - Method in interface org.springframework.ai.mcp.ToolContextToMcpMetaConverter
-
Convert the given
ToolContextto a Mapinvalid input: '<'String, Object> as MCP tool call metadata. - createToolDefinition(String, McpSchema.Tool) - Static method in class org.springframework.ai.mcp.McpToolUtils
-
Creates a Spring AI ToolDefinition from an MCP Tool.
- customize(String, McpClient.AsyncSpec) - Method in interface org.springframework.ai.mcp.customizer.McpAsyncClientCustomizer
-
Customizes an asynchronous MCP client configuration.
- customize(String, McpClient.SyncSpec) - Method in interface org.springframework.ai.mcp.customizer.McpSyncClientCustomizer
-
Customizes a synchronous MCP client configuration.
D
- defaultConverter() - Static method in interface org.springframework.ai.mcp.ToolContextToMcpMetaConverter
- DefaultMcpToolNamePrefixGenerator - Class in org.springframework.ai.mcp
-
Default implementation of
McpToolNamePrefixGeneratorthat ensures unique tool names for all client/server connections. - DefaultMcpToolNamePrefixGenerator() - Constructor for class org.springframework.ai.mcp.DefaultMcpToolNamePrefixGenerator
E
- equals(Object) - Method in record class org.springframework.ai.mcp.McpConnectionInfo
-
Indicates whether some other object is "equal to" this one.
F
- format(String) - Static method in class org.springframework.ai.mcp.McpToolUtils
G
- getConnectionName() - Method in class org.springframework.ai.mcp.McpToolsChangedEvent
- getMcpExchange(ToolContext) - Static method in class org.springframework.ai.mcp.McpToolUtils
-
Retrieves the MCP exchange object from the provided tool context if it exists.
- getOriginalToolName() - Method in class org.springframework.ai.mcp.AsyncMcpToolCallback
- getOriginalToolName() - Method in class org.springframework.ai.mcp.SyncMcpToolCallback
-
Returns the original MCP tool name without prefixing.
- getToolCallbacks() - Method in class org.springframework.ai.mcp.AsyncMcpToolCallbackProvider
-
Discovers and returns all available tools from configured MCP servers.
- getToolCallbacks() - Method in class org.springframework.ai.mcp.SyncMcpToolCallbackProvider
- getToolCallbacksFromAsyncClients(McpAsyncClient...) - Static method in class org.springframework.ai.mcp.McpToolUtils
-
Convenience method to get tool callbacks from multiple asynchronous MCP clients.
- getToolCallbacksFromAsyncClients(List) - Static method in class org.springframework.ai.mcp.McpToolUtils
-
Gets tool callbacks from a list of asynchronous MCP clients.
- getToolCallbacksFromSyncClients(McpSyncClient...) - Static method in class org.springframework.ai.mcp.McpToolUtils
-
Convenience method to get tool callbacks from multiple synchronous MCP clients.
- getToolCallbacksFromSyncClients(List) - Static method in class org.springframework.ai.mcp.McpToolUtils
-
Gets tool callbacks from a list of synchronous MCP clients.
- getToolDefinition() - Method in class org.springframework.ai.mcp.AsyncMcpToolCallback
- getToolDefinition() - Method in class org.springframework.ai.mcp.SyncMcpToolCallback
- getTools() - Method in class org.springframework.ai.mcp.McpToolsChangedEvent
H
- hashCode() - Method in record class org.springframework.ai.mcp.McpConnectionInfo
-
Returns a hash code value for this object.
I
- initializeResult() - Method in record class org.springframework.ai.mcp.McpConnectionInfo
-
Returns the value of the
initializeResultrecord component. - initializeResult(McpSchema.InitializeResult) - Method in class org.springframework.ai.mcp.McpConnectionInfo.Builder
-
Sets the initialize result.
- invalidateCache() - Method in class org.springframework.ai.mcp.AsyncMcpToolCallbackProvider
-
Invalidates the cached tool callbacks, forcing re-discovery on next request.
- invalidateCache() - Method in class org.springframework.ai.mcp.SyncMcpToolCallbackProvider
-
Invalidates the cached tool callbacks, forcing re-discovery on next request.
M
- McpAsyncClientCustomizer - Interface in org.springframework.ai.mcp.customizer
-
Interface for customizing asynchronous MCP client configurations.
- mcpClient(McpAsyncClient) - Method in class org.springframework.ai.mcp.AsyncMcpToolCallback.Builder
-
Sets the MCP client for tool execution.
- mcpClient(McpSyncClient) - Method in class org.springframework.ai.mcp.SyncMcpToolCallback.Builder
-
Sets the MCP client for tool execution.
- mcpClients(McpAsyncClient...) - Method in class org.springframework.ai.mcp.AsyncMcpToolCallbackProvider.Builder
-
Sets MCP clients.
- mcpClients(McpSyncClient...) - Method in class org.springframework.ai.mcp.SyncMcpToolCallbackProvider.Builder
-
Sets MCP clients for tool discovery (replaces existing).
- mcpClients(List) - Method in class org.springframework.ai.mcp.AsyncMcpToolCallbackProvider.Builder
-
Sets MCP clients.
- mcpClients(List) - Method in class org.springframework.ai.mcp.SyncMcpToolCallbackProvider.Builder
-
Sets MCP clients for tool discovery (replaces existing).
- McpConnectionInfo - Record Class in org.springframework.ai.mcp
-
MCP connection info record containing the client and server related metadata.
- McpConnectionInfo(McpSchema.ClientCapabilities, McpSchema.Implementation, McpSchema.InitializeResult) - Constructor for record class org.springframework.ai.mcp.McpConnectionInfo
-
Creates an instance of a
McpConnectionInforecord class. - McpConnectionInfo.Builder - Class in org.springframework.ai.mcp
-
Builder class for constructing McpConnectionInfo instances.
- McpHints - Class in org.springframework.ai.mcp.aot
-
Runtime hints registrar for Model Context Protocol (MCP) schema classes.
- McpHints() - Constructor for class org.springframework.ai.mcp.aot.McpHints
- McpSyncClientCustomizer - Interface in org.springframework.ai.mcp.customizer
-
Interface for customizing synchronous MCP client configurations.
- McpToolFilter - Interface in org.springframework.ai.mcp
-
A
BiPredicateforSyncMcpToolCallbackProviderand theAsyncMcpToolCallbackProviderto filter the discovered tool for the givenMcpConnectionInfo. - McpToolNamePrefixGenerator - Interface in org.springframework.ai.mcp
-
Strategy interface for generating prefixed tool name based on MCP client/server and Tool information.
- McpToolsChangedEvent - Class in org.springframework.ai.mcp
-
Event published when the MCP Tools have changed for a given MCP connection.
- McpToolsChangedEvent(String, List) - Constructor for class org.springframework.ai.mcp.McpToolsChangedEvent
- McpToolUtils - Class in org.springframework.ai.mcp
-
Utility class that provides helper methods for working with Model Context Protocol (MCP) tools in a Spring AI environment.
N
- noOp() - Static method in interface org.springframework.ai.mcp.ToolContextToMcpMetaConverter
-
Static factory method to create a no-op converter that returns an empty map.
- noPrefix() - Static method in interface org.springframework.ai.mcp.McpToolNamePrefixGenerator
-
Static factory method to create a no-op prefix generator that returns the tool name
O
- onApplicationEvent(McpToolsChangedEvent) - Method in class org.springframework.ai.mcp.AsyncMcpToolCallbackProvider
- onApplicationEvent(McpToolsChangedEvent) - Method in class org.springframework.ai.mcp.SyncMcpToolCallbackProvider
- org.springframework.ai.mcp - package org.springframework.ai.mcp
-
Core support for Model Context Protocol (MCP) integration in Spring AI.
- org.springframework.ai.mcp.aot - package org.springframework.ai.mcp.aot
- org.springframework.ai.mcp.customizer - package org.springframework.ai.mcp.customizer
P
- prefixedToolName(String) - Method in class org.springframework.ai.mcp.AsyncMcpToolCallback.Builder
-
Sets the prefixed tool name for the tool definition.
- prefixedToolName(String) - Method in class org.springframework.ai.mcp.SyncMcpToolCallback.Builder
-
Sets the prefixed tool name.
- prefixedToolName(String, String) - Static method in class org.springframework.ai.mcp.McpToolUtils
- prefixedToolName(String, String, String) - Static method in class org.springframework.ai.mcp.McpToolUtils
- prefixedToolName(McpConnectionInfo, McpSchema.Tool) - Method in class org.springframework.ai.mcp.DefaultMcpToolNamePrefixGenerator
- prefixedToolName(McpConnectionInfo, McpSchema.Tool) - Method in interface org.springframework.ai.mcp.McpToolNamePrefixGenerator
R
- registerHints(RuntimeHints, ClassLoader) - Method in class org.springframework.ai.mcp.aot.McpHints
-
Registers runtime hints for MCP schema classes.
S
- SyncMcpToolCallback - Class in org.springframework.ai.mcp
-
Synchronous adapter bridging MCP tools to Spring AI's
ToolCallbackinterface. - SyncMcpToolCallback(McpSyncClient, McpSchema.Tool) - Constructor for class org.springframework.ai.mcp.SyncMcpToolCallback
-
Deprecated.use
SyncMcpToolCallback.builder()instead - SyncMcpToolCallback.Builder - Class in org.springframework.ai.mcp
-
Builder for
SyncMcpToolCallbackinstances. - SyncMcpToolCallbackProvider - Class in org.springframework.ai.mcp
-
Provides Spring AI tool callbacks by discovering tools from MCP servers.
- SyncMcpToolCallbackProvider(McpSyncClient...) - Constructor for class org.springframework.ai.mcp.SyncMcpToolCallbackProvider
-
Deprecated.use
SyncMcpToolCallbackProvider.builder()instead - SyncMcpToolCallbackProvider(List) - Constructor for class org.springframework.ai.mcp.SyncMcpToolCallbackProvider
-
Deprecated.use
SyncMcpToolCallbackProvider.builder()instead - SyncMcpToolCallbackProvider(McpToolFilter, List) - Constructor for class org.springframework.ai.mcp.SyncMcpToolCallbackProvider
-
Deprecated.use
SyncMcpToolCallbackProvider.builder()instead - SyncMcpToolCallbackProvider(McpToolFilter, McpToolNamePrefixGenerator, McpSyncClient...) - Constructor for class org.springframework.ai.mcp.SyncMcpToolCallbackProvider
-
Deprecated.use
SyncMcpToolCallbackProvider.builder()instead - SyncMcpToolCallbackProvider.Builder - Class in org.springframework.ai.mcp
-
Builder for
SyncMcpToolCallbackProvider. - syncToolCallbacks(List) - Static method in class org.springframework.ai.mcp.SyncMcpToolCallbackProvider
-
Creates tool callbacks from multiple MCP clients.
T
- toAsyncToolSpecification(ToolCallback) - Static method in class org.springframework.ai.mcp.McpToolUtils
-
Converts a Spring AI tool callback to an MCP asynchronous tool specification.
- toAsyncToolSpecification(ToolCallback, MimeType) - Static method in class org.springframework.ai.mcp.McpToolUtils
-
Converts a Spring AI tool callback to an MCP asynchronous tool specification.
- toAsyncToolSpecifications(List) - Static method in class org.springframework.ai.mcp.McpToolUtils
-
Converts a list of Spring AI tool callbacks to MCP asynchronous tool specification.
- toAsyncToolSpecifications(ToolCallback...) - Static method in class org.springframework.ai.mcp.McpToolUtils
-
Convenience method to convert a variable number of tool callbacks to MCP asynchronous tool specification.
- tool(McpSchema.Tool) - Method in class org.springframework.ai.mcp.AsyncMcpToolCallback.Builder
-
Sets the MCP tool to adapt.
- tool(McpSchema.Tool) - Method in class org.springframework.ai.mcp.SyncMcpToolCallback.Builder
-
Sets the MCP tool to adapt.
- TOOL_CONTEXT_MCP_EXCHANGE_KEY - Static variable in class org.springframework.ai.mcp.McpToolUtils
-
The name of tool context key used to store the MCP exchange object.
- toolContextToMcpMetaConverter(ToolContextToMcpMetaConverter) - Method in class org.springframework.ai.mcp.AsyncMcpToolCallback.Builder
-
Sets the converter for tool context to MCP metadata transformation.
- toolContextToMcpMetaConverter(ToolContextToMcpMetaConverter) - Method in class org.springframework.ai.mcp.AsyncMcpToolCallbackProvider.Builder
-
Sets tool context to MCP metadata converter.
- toolContextToMcpMetaConverter(ToolContextToMcpMetaConverter) - Method in class org.springframework.ai.mcp.SyncMcpToolCallback.Builder
-
Sets the converter for tool context to MCP metadata transformation.
- toolContextToMcpMetaConverter(ToolContextToMcpMetaConverter) - Method in class org.springframework.ai.mcp.SyncMcpToolCallbackProvider.Builder
-
Sets tool context to MCP metadata converter.
- ToolContextToMcpMetaConverter - Interface in org.springframework.ai.mcp
-
Strategy interface for converting a
ToolContextto a map of metadata to be sent as part of an MCP tool call. - toolFilter(McpToolFilter) - Method in class org.springframework.ai.mcp.AsyncMcpToolCallbackProvider.Builder
-
Sets tool filter.
- toolFilter(McpToolFilter) - Method in class org.springframework.ai.mcp.SyncMcpToolCallbackProvider.Builder
-
Sets tool filter.
- toolNamePrefixGenerator(McpToolNamePrefixGenerator) - Method in class org.springframework.ai.mcp.AsyncMcpToolCallbackProvider.Builder
-
Sets tool name prefix generator.
- toolNamePrefixGenerator(McpToolNamePrefixGenerator) - Method in class org.springframework.ai.mcp.SyncMcpToolCallbackProvider.Builder
-
Sets tool name prefix generator.
- toStatelessAsyncToolSpecification(ToolCallback, MimeType) - Static method in class org.springframework.ai.mcp.McpToolUtils
- toStatelessSyncToolSpecification(ToolCallback, MimeType) - Static method in class org.springframework.ai.mcp.McpToolUtils
-
Converts a Spring AI ToolCallback to an MCP StatelessSyncToolSpecification.
- toString() - Method in record class org.springframework.ai.mcp.McpConnectionInfo
-
Returns a string representation of this record class.
- toSyncToolSpecification(List) - Static method in class org.springframework.ai.mcp.McpToolUtils
-
Converts a list of Spring AI tool callbacks to MCP synchronous tool specification.
- toSyncToolSpecification(ToolCallback) - Static method in class org.springframework.ai.mcp.McpToolUtils
-
Converts a Spring AI ToolCallback to an MCP SyncToolSpecification.
- toSyncToolSpecification(ToolCallback, MimeType) - Static method in class org.springframework.ai.mcp.McpToolUtils
-
Converts a Spring AI ToolCallback to an MCP SyncToolSpecification.
- toSyncToolSpecifications(ToolCallback...) - Static method in class org.springframework.ai.mcp.McpToolUtils
-
Convenience method to convert a variable number of tool callbacks to MCP synchronous tool specification.
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
AsyncMcpToolCallback.Builderinstead