diff --git a/auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/McpServerAutoConfiguration.java b/auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/McpServerAutoConfiguration.java index c280cc684a7..733750ebfb1 100644 --- a/auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/McpServerAutoConfiguration.java +++ b/auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/McpServerAutoConfiguration.java @@ -81,7 +81,7 @@ @EnableConfigurationProperties({ McpServerProperties.class, McpServerChangeNotificationProperties.class }) @ConditionalOnProperty(prefix = McpServerProperties.CONFIG_PREFIX, name = "enabled", havingValue = "true", matchIfMissing = true) -@Conditional(McpServerAutoConfiguration.NonStatlessServerCondition.class) +@Conditional(McpServerAutoConfiguration.NonStatelessServerCondition.class) public class McpServerAutoConfiguration { private static final LogAccessor logger = new LogAccessor(McpServerAutoConfiguration.class); @@ -295,9 +295,9 @@ public McpAsyncServer mcpAsyncServer(McpServerTransportProviderBase transportPro return serverBuilder.build(); } - public static class NonStatlessServerCondition extends AnyNestedCondition { + public static class NonStatelessServerCondition extends AnyNestedCondition { - public NonStatlessServerCondition() { + public NonStatelessServerCondition() { super(ConfigurationPhase.PARSE_CONFIGURATION); } @@ -308,7 +308,7 @@ static class SseEnabledCondition { } @ConditionalOnProperty(prefix = McpServerProperties.CONFIG_PREFIX, name = "protocol", - havingValue = "STREAMABLE", matchIfMissing = false) + havingValue = "STREAMABLE") static class StreamableEnabledCondition { } @@ -348,7 +348,7 @@ static class McpServerEnabledCondition { } @ConditionalOnProperty(prefix = McpServerProperties.CONFIG_PREFIX, name = "protocol", - havingValue = "STREAMABLE", matchIfMissing = false) + havingValue = "STREAMABLE") static class StreamableEnabledCondition { } diff --git a/auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/McpServerStatelessAutoConfiguration.java b/auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/McpServerStatelessAutoConfiguration.java index 242b7618bfe..8e32c83d484 100644 --- a/auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/McpServerStatelessAutoConfiguration.java +++ b/auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/McpServerStatelessAutoConfiguration.java @@ -234,8 +234,7 @@ static class McpServerEnabledCondition { } - @ConditionalOnProperty(prefix = McpServerProperties.CONFIG_PREFIX, name = "protocol", havingValue = "STATELESS", - matchIfMissing = false) + @ConditionalOnProperty(prefix = McpServerProperties.CONFIG_PREFIX, name = "protocol", havingValue = "STATELESS") static class StatelessEnabledCondition { } diff --git a/auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/ToolCallbackConverterAutoConfiguration.java b/auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/ToolCallbackConverterAutoConfiguration.java index bcfb4666210..27dacd7912e 100644 --- a/auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/ToolCallbackConverterAutoConfiguration.java +++ b/auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common/src/main/java/org/springframework/ai/mcp/server/common/autoconfigure/ToolCallbackConverterAutoConfiguration.java @@ -42,7 +42,7 @@ @AutoConfiguration @EnableConfigurationProperties(McpServerProperties.class) @Conditional({ ToolCallbackConverterAutoConfiguration.ToolCallbackConverterCondition.class, - McpServerAutoConfiguration.NonStatlessServerCondition.class }) + McpServerAutoConfiguration.NonStatelessServerCondition.class }) public class ToolCallbackConverterAutoConfiguration { @Bean diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-overview.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-overview.adoc index 3e639996690..90be2f2d4b3 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-overview.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-overview.adoc @@ -96,7 +96,7 @@ Spring AI provides MCP integration through the following Spring Boot starters: |Server Type | Dependency | Property | xref:api/mcp/mcp-stdio-sse-server-boot-starter-docs.adoc#_sse_webmvc_serve[SSE WebMVC] | `spring-ai-starter-mcp-server-webmvc` | `spring.ai.mcp.server.protocol=SSE` or empty | xref:api/mcp/mcp-streamable-http-server-boot-starter-docs.adoc#_streamable_http_webmvc_server[Streamable-HTTP WebMVC] | `spring-ai-starter-mcp-server-webmvc` | `spring.ai.mcp.server.protocol=STREAMABLE` -| xref:api/mcp/mcp-stateless-server-boot-starter-docs.adoc#_stateless_webmvc_server[Stateless WebMVC] | `spring-ai-starter-mcp-server-webmvc` | `spring.ai.mcp.server.protocol=STATLESS` +| xref:api/mcp/mcp-stateless-server-boot-starter-docs.adoc#_stateless_webmvc_server[Stateless WebMVC] | `spring-ai-starter-mcp-server-webmvc` | `spring.ai.mcp.server.protocol=STATELESS` |=== ==== WebMVC (Reactive) @@ -104,7 +104,7 @@ Spring AI provides MCP integration through the following Spring Boot starters: |Server Type | Dependency | Property | xref:api/mcp/mcp-stdio-sse-server-boot-starter-docs.adoc#_sse_webflux_serve[SSE WebFlux] | `spring-ai-starter-mcp-server-webflux` | `spring.ai.mcp.server.protocol=SSE` or empty | xref:api/mcp/mcp-streamable-http-server-boot-starter-docs.adoc#_streamable_http_webflux_server[Streamable-HTTP WebFlux] | `spring-ai-starter-mcp-server-webflux` | `spring.ai.mcp.server.protocol=STREAMABLE` -| xref:api/mcp/mcp-stateless-server-boot-starter-docs.adoc#_stateless_webflux_server[Stateless WebFlux] | `spring-ai-starter-mcp-server-webflux` | `spring.ai.mcp.server.protocol=STATLESS` +| xref:api/mcp/mcp-stateless-server-boot-starter-docs.adoc#_stateless_webflux_server[Stateless WebFlux] | `spring-ai-starter-mcp-server-webflux` | `spring.ai.mcp.server.protocol=STATELESS` |=== == xref:api/mcp/mcp-annotations-overview.adoc[Spring AI MCP Annotations] diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-server-boot-starter-docs.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-server-boot-starter-docs.adoc index f454134a3f6..8719c2bb045 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-server-boot-starter-docs.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-server-boot-starter-docs.adoc @@ -35,7 +35,7 @@ Use the dedicated starter and the correct `spring.ai.mcp.server.protocol` proper |Server Type | Dependency | Property | xref:api/mcp/mcp-stdio-sse-server-boot-starter-docs.adoc#_sse_webmvc_serve[SSE WebMVC] | `spring-ai-starter-mcp-server-webmvc` | `spring.ai.mcp.server.protocol=SSE` or empty | xref:api/mcp/mcp-streamable-http-server-boot-starter-docs.adoc#_streamable_http_webmvc_server[Streamable-HTTP WebMVC] | `spring-ai-starter-mcp-server-webmvc` | `spring.ai.mcp.server.protocol=STREAMABLE` -| xref:api/mcp/mcp-stateless-server-boot-starter-docs.adoc#_stateless_webmvc_server[Stateless WebMVC] | `spring-ai-starter-mcp-server-webmvc` | `spring.ai.mcp.server.protocol=STATLESS` +| xref:api/mcp/mcp-stateless-server-boot-starter-docs.adoc#_stateless_webmvc_server[Stateless WebMVC] | `spring-ai-starter-mcp-server-webmvc` | `spring.ai.mcp.server.protocol=STATELESS` |=== === WebMVC (Reactive) @@ -43,7 +43,7 @@ Use the dedicated starter and the correct `spring.ai.mcp.server.protocol` proper |Server Type | Dependency | Property | xref:api/mcp/mcp-stdio-sse-server-boot-starter-docs.adoc#_sse_webflux_serve[SSE WebFlux] | `spring-ai-starter-mcp-server-webflux` | `spring.ai.mcp.server.protocol=SSE` or empty | xref:api/mcp/mcp-streamable-http-server-boot-starter-docs.adoc#_streamable_http_webflux_server[Streamable-HTTP WebFlux] | `spring-ai-starter-mcp-server-webflux` | `spring.ai.mcp.server.protocol=STREAMABLE` -| xref:api/mcp/mcp-stateless-server-boot-starter-docs.adoc#_stateless_webflux_server[Stateless WebFlux] | `spring-ai-starter-mcp-server-webflux` | `spring.ai.mcp.server.protocol=STATLESS` +| xref:api/mcp/mcp-stateless-server-boot-starter-docs.adoc#_stateless_webflux_server[Stateless WebFlux] | `spring-ai-starter-mcp-server-webflux` | `spring.ai.mcp.server.protocol=STATELESS` |=== == Server Capabilities diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-stateless-server-boot-starter-docs.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-stateless-server-boot-starter-docs.adoc index 06a2563935a..d6d3c80c32f 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-stateless-server-boot-starter-docs.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-stateless-server-boot-starter-docs.adoc @@ -22,10 +22,10 @@ Use the `spring-ai-starter-mcp-server-webmvc` dependency: ---- -and set the `spring.ai.mcp.server.protocol` property to `STATLESS`. +and set the `spring.ai.mcp.server.protocol` property to `STATELESS`. ---- -spring.ai.mcp.server.protocol=STATLESS +spring.ai.mcp.server.protocol=STATELESS ---- - Stateless operation with Spring MVC transport @@ -45,7 +45,7 @@ Use the `spring-ai-starter-mcp-server-webflux` dependency: ---- -and set the `spring.ai.mcp.server.protocol` property to `STATLESS`. +and set the `spring.ai.mcp.server.protocol` property to `STATELESS`. - Reactive stateless operation with WebFlux transport - No session state management @@ -62,7 +62,7 @@ All Common properties are prefixed with `spring.ai.mcp.server`: |=== |Property |Description |Default |`enabled` |Enable/disable the stateless MCP server |`true` -|`protocol` |MCP server protocol | Must be set to `STATLESS` to enable the stateless server +|`protocol` |MCP server protocol | Must be set to `STATELESS` to enable the stateless server |`tool-callback-converter` |Enable/disable the conversion of Spring AI ToolCallbacks into MCP Tool specs |`true` |`name` |Server name for identification |`mcp-server` |`version` |Server version |`1.0.0`