- Updated package prefix: `org.springframework.ai.mcp` → `org.modelcontextprotocol` - Changed POM groupId: `org.springframework.experimental` → `org.modelcontextprotocol.sdk` - Update all dependecies and BOM - Updated documentation references accordingly Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
29 lines
611 B
Markdown
29 lines
611 B
Markdown
# WebMVC SSE Server Transport
|
|
|
|
```xml
|
|
<dependency>
|
|
<groupId>org.modelcontextprotocol.sdk</groupId>
|
|
<artifactId>mcp-webmvc-sse-transport</artifactId>
|
|
</dependency>
|
|
```
|
|
|
|
|
|
|
|
```java
|
|
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();
|
|
}
|
|
}
|
|
```
|