Package io.vertx.ext.mcp.transport
Class VertxMcpStreamableServerTransportProvider
java.lang.Object
io.vertx.ext.mcp.transport.VertxMcpStreamableServerTransportProvider
- All Implemented Interfaces:
io.modelcontextprotocol.spec.McpServerTransportProviderBase,io.modelcontextprotocol.spec.McpStreamableServerTransportProvider,VertxMcpTransport
public class VertxMcpStreamableServerTransportProvider
extends Object
implements io.modelcontextprotocol.spec.McpStreamableServerTransportProvider, VertxMcpTransport
Implementation of a Vert.x based Streamable HTTP transport provider for MCP.
This implementation follows the MCP 2025-06-18 specification for Streamable HTTP transport,
which consolidates the previous HTTP+SSE transport into a single endpoint that supports
both POST and GET methods.
Created By Navíd Mitchell 🤪on 8/11/25
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVertxMcpStreamableServerTransportProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String mcpEndpoint, boolean disallowDelete, io.vertx.core.Vertx vertx, Duration keepAliveInterval) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()reactor.core.publisher.Mono<Void> Close the Vert.x MCP transport gracefully.io.vertx.ext.web.RouterGet the router for the Vert.x MCP transport.reactor.core.publisher.Mono<Void> notifyClients(String method, Object params) voidsetSessionFactory(io.modelcontextprotocol.spec.McpStreamableServerSession.Factory sessionFactory) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.modelcontextprotocol.spec.McpStreamableServerTransportProvider
close
-
Field Details
-
MESSAGE_EVENT_TYPE
- See Also:
-
-
Constructor Details
-
VertxMcpStreamableServerTransportProvider
-
-
Method Details
-
getRouter
public io.vertx.ext.web.Router getRouter()Description copied from interface:VertxMcpTransportGet the router for the Vert.x MCP transport.- Specified by:
getRouterin interfaceVertxMcpTransport- Returns:
- The router for the Vert.x MCP transport.
-
protocolVersions
- Specified by:
protocolVersionsin interfaceio.modelcontextprotocol.spec.McpServerTransportProviderBase
-
setSessionFactory
public void setSessionFactory(io.modelcontextprotocol.spec.McpStreamableServerSession.Factory sessionFactory) - Specified by:
setSessionFactoryin interfaceio.modelcontextprotocol.spec.McpStreamableServerTransportProvider
-
notifyClients
- Specified by:
notifyClientsin interfaceio.modelcontextprotocol.spec.McpServerTransportProviderBase- Specified by:
notifyClientsin interfaceio.modelcontextprotocol.spec.McpStreamableServerTransportProvider
-
closeGracefully
Description copied from interface:VertxMcpTransportClose the Vert.x MCP transport gracefully.- Specified by:
closeGracefullyin interfaceio.modelcontextprotocol.spec.McpServerTransportProviderBase- Specified by:
closeGracefullyin interfaceio.modelcontextprotocol.spec.McpStreamableServerTransportProvider- Specified by:
closeGracefullyin interfaceVertxMcpTransport- Returns:
- A Mono that completes when the transport is closed.
-
builder
public static VertxMcpStreamableServerTransportProvider.VertxMcpStreamableServerTransportProviderBuilder builder()
-