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
  • Field Details

  • Constructor Details

    • VertxMcpStreamableServerTransportProvider

      public VertxMcpStreamableServerTransportProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String mcpEndpoint, boolean disallowDelete, io.vertx.core.Vertx vertx, Duration keepAliveInterval)
  • Method Details

    • getRouter

      public io.vertx.ext.web.Router getRouter()
      Description copied from interface: VertxMcpTransport
      Get the router for the Vert.x MCP transport.
      Specified by:
      getRouter in interface VertxMcpTransport
      Returns:
      The router for the Vert.x MCP transport.
    • protocolVersions

      public List<String> protocolVersions()
      Specified by:
      protocolVersions in interface io.modelcontextprotocol.spec.McpServerTransportProviderBase
    • setSessionFactory

      public void setSessionFactory(io.modelcontextprotocol.spec.McpStreamableServerSession.Factory sessionFactory)
      Specified by:
      setSessionFactory in interface io.modelcontextprotocol.spec.McpStreamableServerTransportProvider
    • notifyClients

      public reactor.core.publisher.Mono<Void> notifyClients(String method, Object params)
      Specified by:
      notifyClients in interface io.modelcontextprotocol.spec.McpServerTransportProviderBase
      Specified by:
      notifyClients in interface io.modelcontextprotocol.spec.McpStreamableServerTransportProvider
    • closeGracefully

      public reactor.core.publisher.Mono<Void> closeGracefully()
      Description copied from interface: VertxMcpTransport
      Close the Vert.x MCP transport gracefully.
      Specified by:
      closeGracefully in interface io.modelcontextprotocol.spec.McpServerTransportProviderBase
      Specified by:
      closeGracefully in interface io.modelcontextprotocol.spec.McpStreamableServerTransportProvider
      Specified by:
      closeGracefully in interface VertxMcpTransport
      Returns:
      A Mono that completes when the transport is closed.
    • builder