-
Notifications
You must be signed in to change notification settings - Fork 750
Description
Please do a quick search on GitHub issues first, the feature you are about to request might have already been requested.
Expected Behavior
mcp-spring-webflux should start without ClassNotFoundException when the consumer upgrades to Spring Boot 4.x / Spring Framework 7.x.
Ideally the SDK would provide a new starter (e.g. mcp-spring-webflux-spring7) or a BOM that aligns Netty/Reactor versions so that the following snippet works out-of-the-box:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis-reactive</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>io.modelcontextprotocol</groupId>
<artifactId>mcp-spring-webflux</artifactId>
<version>${mcp.version}</version>
</dependency>
No extra exclusions or manual Netty version management should be required.
Current Behavior
After upgrading to
Spring Boot 4.0.0
the application fails to start with:
Caused by: java.lang.NoClassDefFoundError: io/netty/channel/MultiThreadIoEventLoopGroup
at reactor.netty.resources.DefaultLoopResources.cacheNioServerLoops(DefaultLoopResources.java:215)
Root cause:
mcp-spring-webflux is compiled against Spring 6.x / Reactor Netty 1.1.x, which still uses the old Netty API (io.netty.channel.MultiThreadIoEventLoopGroup).
Spring Boot 4.x pulls Netty 4.2.x where that class has been removed / relocated, so the class loader cannot find it and the reactive web server (NettyWebServer) fails to start.
Context
This blocks any project that wants to adopt Spring Boot 4.x while continuing to expose an MCP server through the official Java SDK.
Work-arounds tried:
– Downgrade Spring Boot → not acceptable, we need Boot 4 features.
– Exclude Netty from mcp-spring-webflux and override version → works, but forces every consumer to discover the correct Netty/Reactor combination themselves.
We would like to keep using the SDK instead of re-implementing the protocol layer ourselves.
A version matrix or a -spring7 variant would solve the issue cleanly.