-
Notifications
You must be signed in to change notification settings - Fork 575
Description
Would it be possible to provide a minimal-dependency version of the MCP Java SDK?
Expected Behavior
The current SDK is heavily tied to Spring libraries, while the MCP protocol itself is actual platform-agnostic. When building a remote MCP server, particularly using the streamable HTTP transport, it essentially functions as a standard HTTP server. Providing a minimal-dependency version of the MCP Java SDK would give developers the flexibility to implement their servers using the platform of their choice. We seems do have such support in python SDK, as we can mount the MCP server to different HTTP platform.
Current Behavior
The current SDK relies heavily on Mono and HttpServletRequest, which ties it to specific libraries and frameworks. Would it be possible to refactor the SDK to use more standard Java classes like CompletableFuture or CompletionStage? For the HTTP layer, providing generic interfaces instead of concrete types would allow developers to integrate their own preferred implementations more easily.
Context
I initially tried to implement a MCP server using current SDK into a vert.x application but I found out it would be quite hard to work with the conversion between Mono and HttpServletRequest vs CompletableFuture and HttpServerRequest/RoutingContext. I ended up to implement my own Java SDK to integrate with our platform, and fortunately, it works well. However, I genuinely hope official support for this use case can be provided in the future.