java-sdk/mcp-spring/mcp-spring-webmvc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel Garnier-Moiroux 6f3906480d Move mcp-core integration tests to mcp-test package
- The integration tests pass with both Jackson 2 and Jackson 3.
- Modified McpSchemaTests.testContentDeserializationWrongType to work
  with both Jackson 2 and Jackson 3.

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-02-12 09:13:38 +01:00
..
src Move mcp-core integration tests to mcp-test package 2026-02-12 09:13:38 +01:00
pom.xml Decouple mcp-test and mcp-spring modules from Jackson implementation (#760) 2026-01-27 15:47:28 +01:00
README.md Module and Package restructoring 2025-01-29 13:40:53 +01:00

WebMVC SSE Server Transport

<dependency>
    <groupId>io.modelcontextprotocol.sdk</groupId>
    <artifactId>mcp-spring-webmvc</artifactId>
</dependency>
String MESSAGE_ENDPOINT = "/mcp/message";

@Configuration
@EnableWebMvc
static class MyConfig {

    @Bean
    public WebMvcSseServerTransport webMvcSseServerTransport() {
        return new WebMvcSseServerTransport(new ObjectMapper(), MESSAGE_ENDPOINT);
    }

    @Bean
    public RouterFunction<ServerResponse> routerFunction(WebMvcSseServerTransport transport) {
        return transport.getRouterFunction();
    }
}