java-sdk/mcp-spring/mcp-spring-webmvc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Luca Chang 8a5a591d39 feat: Add elicitation support to MCP protocol
Implement elicitation capabilities allowing servers to request additional information
from users through clients during interactions. This feature provides a standardized
way for servers to gather necessary information dynamically while clients maintain
control over user interactions and data sharing.

- Add ElicitRequest and ElicitResult classes to McpSchema
- Implement elicitation handlers in client classes
- Add elicitation capabilities to server exchange classes
- Add tests for elicitation functionality with various scenarios
2025-06-10 13:37:23 +02:00
..
src feat: Add elicitation support to MCP protocol 2025-06-10 13:37:23 +02:00
pom.xml Next development version 2025-05-12 15:04:05 +02: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();
    }
}