Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

Expand All @@ -308,7 +308,7 @@ static class SseEnabledCondition {
}

@ConditionalOnProperty(prefix = McpServerProperties.CONFIG_PREFIX, name = "protocol",
havingValue = "STREAMABLE", matchIfMissing = false)
havingValue = "STREAMABLE")
static class StreamableEnabledCondition {

}
Expand Down Expand Up @@ -348,7 +348,7 @@ static class McpServerEnabledCondition {
}

@ConditionalOnProperty(prefix = McpServerProperties.CONFIG_PREFIX, name = "protocol",
havingValue = "STREAMABLE", matchIfMissing = false)
havingValue = "STREAMABLE")
static class StreamableEnabledCondition {

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
@AutoConfiguration
@EnableConfigurationProperties(McpServerProperties.class)
@Conditional({ ToolCallbackConverterAutoConfiguration.ToolCallbackConverterCondition.class,
McpServerAutoConfiguration.NonStatlessServerCondition.class })
McpServerAutoConfiguration.NonStatelessServerCondition.class })
public class ToolCallbackConverterAutoConfiguration {

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ 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)
|===
|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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ 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)
|===
|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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ Use the `spring-ai-starter-mcp-server-webmvc` dependency:
</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
Expand All @@ -45,7 +45,7 @@ Use the `spring-ai-starter-mcp-server-webflux` dependency:
</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
Expand All @@ -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`
Expand Down
Loading