| Filename | Latest commit message | Latest commit date |
|---|---|---|
This is a follow-up to #742. The `mcp-test`, `mcp-spring-webflux`, and `mcp-spring-webmvc` depended on `mcp` module which transitively brought in Jackson 3 dependencies. These modules are now decoupled and only depend on `mcp-core`. The test dependencies bring in Jackson 2 for the time being. This is a breaking change but it is required to allow easily exchanging Jackson2 and Jackson3 modules. Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com> |
||
| .. | ||
| src | ||
| pom.xml | ||
| README.md | ||
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();
}
}