Creates WebFlux-based SSE server transport.
Requires the mcp-spring-webflux dependency.
Implements the MCP HTTP with SSE transport specification, providing:
+Creates WebMvc-based SSE server transport.
Requires the mcp-spring-webmvc dependency.
Implements the MCP HTTP with SSE transport specification, providing:
+
+ Creates a Servlet-based SSE server transport.
+ Included in the core mcp module.
+ The HttpServletSseServerTransport can be used with any Servlet container.
+ To use it with a Spring Web application, you can register it as a Servlet bean:
+
+ Implements the MCP HTTP with SSE transport specification using the traditional Servlet API, providing: +
+/sse) for server-to-client eventsCreates WebFlux-based SSE server transport.
Requires the mcp-spring-webflux dependency.
-
- {`@Configuration
-class McpConfig {
- @Bean
- WebFluxSseServerTransport webFluxSseServerTransport(ObjectMapper mapper) {
- return new WebFluxSseServerTransport(mapper, "/mcp/message");
- }
-
- @Bean
- RouterFunction> mcpRouterFunction(WebFluxSseServerTransport transport) {
- return transport.getRouterFunction();
- }
-}`}
-
-
-
- Implements the MCP HTTP with SSE transport specification, providing:
-Creates WebMvc-based SSE server transport.
Requires the mcp-spring-webmvc dependency.
-
- {`@Configuration
-@EnableWebMvc
-class McpConfig {
- @Bean
- WebMvcSseServerTransport webMvcSseServerTransport(ObjectMapper mapper) {
- return new WebMvcSseServerTransport(mapper, "/mcp/message");
- }
-
- @Bean
- RouterFunction mcpRouterFunction(WebMvcSseServerTransport transport) {
- return transport.getRouterFunction();
- }
-}`}
-
-
-
- Implements the MCP HTTP with SSE transport specification, providing:
-
- Creates a Servlet-based SSE server transport.
- Included in the core mcp module.
- The HttpServletSseServerTransport can be used with any Servlet container.
- To use it with a Spring Web application, you can register it as a Servlet bean:
-
-
- {`@Configuration
-@EnableWebMvc
-public class McpServerConfig implements WebMvcConfigurer {
-
- @Bean
- public HttpServletSseServerTransport servletSseServerTransport() {
- return new HttpServletSseServerTransport(new ObjectMapper(), "/mcp/message");
- }
-
- @Bean
- public ServletRegistrationBean customServletBean(HttpServletSseServerTransport servlet) {
- return new ServletRegistrationBean(servlet);
- }
-}`}
-
-
-
- - Implements the MCP HTTP with SSE transport specification using the traditional Servlet API, providing: -
-/sse) for server-to-client events