Class McpServerStatelessAutoConfiguration
java.lang.Object
org.springframework.ai.mcp.server.common.autoconfigure.McpServerStatelessAutoConfiguration
@AutoConfiguration(afterName={"org.springframework.ai.mcp.server.common.autoconfigure.annotations.StatelessServerSpecificationFactoryAutoConfiguration","org.springframework.ai.mcp.server.common.autoconfigure.StatelessToolCallbackConverterAutoConfiguration","org.springframework.ai.mcp.server.autoconfigure.McpServerStatelessWebFluxAutoConfiguration","org.springframework.ai.mcp.server.autoconfigure.McpServerStatelessWebMvcAutoConfiguration"})
@ConditionalOnClass(io.modelcontextprotocol.spec.McpSchema.class)
@EnableConfigurationProperties(McpServerProperties.class)
@Conditional({McpServerStdioDisabledCondition.class,EnabledStatelessServerCondition.class})
public class McpServerStatelessAutoConfiguration
extends Object
- Author:
- Christian Tzolov
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.modelcontextprotocol.spec.McpSchema.ServerCapabilities.Builder
io.modelcontextprotocol.server.McpStatelessAsyncServer
mcpStatelessAsyncServer
(io.modelcontextprotocol.spec.McpStatelessServerTransport statelessTransport, io.modelcontextprotocol.spec.McpSchema.ServerCapabilities.Builder capabilitiesBuilder, McpServerProperties serverProperties, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.AsyncToolSpecification>> tools, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.AsyncResourceSpecification>> resources, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.AsyncResourceTemplateSpecification>> resourceTemplates, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.AsyncPromptSpecification>> prompts, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.AsyncCompletionSpecification>> completions) io.modelcontextprotocol.server.McpStatelessSyncServer
mcpStatelessSyncServer
(io.modelcontextprotocol.spec.McpStatelessServerTransport statelessTransport, io.modelcontextprotocol.spec.McpSchema.ServerCapabilities.Builder capabilitiesBuilder, McpServerProperties serverProperties, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncToolSpecification>> tools, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncResourceSpecification>> resources, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncResourceTemplateSpecification>> resourceTemplates, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncPromptSpecification>> prompts, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncCompletionSpecification>> completions, org.springframework.core.env.Environment environment)
-
Constructor Details
-
McpServerStatelessAutoConfiguration
public McpServerStatelessAutoConfiguration()
-
-
Method Details
-
capabilitiesBuilder
@Bean @ConditionalOnMissingBean public io.modelcontextprotocol.spec.McpSchema.ServerCapabilities.Builder capabilitiesBuilder() -
mcpStatelessSyncServer
@Bean @ConditionalOnProperty(prefix="spring.ai.mcp.server", name="type", havingValue="SYNC", matchIfMissing=true) public io.modelcontextprotocol.server.McpStatelessSyncServer mcpStatelessSyncServer(io.modelcontextprotocol.spec.McpStatelessServerTransport statelessTransport, io.modelcontextprotocol.spec.McpSchema.ServerCapabilities.Builder capabilitiesBuilder, McpServerProperties serverProperties, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncToolSpecification>> tools, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncResourceSpecification>> resources, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncResourceTemplateSpecification>> resourceTemplates, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncPromptSpecification>> prompts, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncCompletionSpecification>> completions, org.springframework.core.env.Environment environment) -
mcpStatelessAsyncServer
@Bean @ConditionalOnProperty(prefix="spring.ai.mcp.server", name="type", havingValue="ASYNC") public io.modelcontextprotocol.server.McpStatelessAsyncServer mcpStatelessAsyncServer(io.modelcontextprotocol.spec.McpStatelessServerTransport statelessTransport, io.modelcontextprotocol.spec.McpSchema.ServerCapabilities.Builder capabilitiesBuilder, McpServerProperties serverProperties, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.AsyncToolSpecification>> tools, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.AsyncResourceSpecification>> resources, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.AsyncResourceTemplateSpecification>> resourceTemplates, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.AsyncPromptSpecification>> prompts, org.springframework.beans.factory.ObjectProvider<List<io.modelcontextprotocol.server.McpStatelessServerFeatures.AsyncCompletionSpecification>> completions)
-