Package io.modelcontextprotocol.spec
Interface McpClientTransport
- All Superinterfaces:
ClientMcpTransport,McpTransport
- All Known Implementing Classes:
HttpClientSseClientTransport,StdioClientTransport
Marker interface for the client-side MCP transport.
- Author:
- Christian Tzolov, Dariusz Jędrzejczyk
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>connect(Function<reactor.core.publisher.Mono<McpSchema.JSONRPCMessage>, reactor.core.publisher.Mono<McpSchema.JSONRPCMessage>> handler) Initializes and starts the transport connection.Methods inherited from interface io.modelcontextprotocol.spec.McpTransport
close, closeGracefully, sendMessage, unmarshalFrom
-
Method Details
-
connect
reactor.core.publisher.Mono<Void> connect(Function<reactor.core.publisher.Mono<McpSchema.JSONRPCMessage>, reactor.core.publisher.Mono<McpSchema.JSONRPCMessage>> handler) Description copied from interface:McpTransportInitializes and starts the transport connection.This method should be called before any message exchange can occur. It sets up the necessary resources and establishes the connection to the server.
- Specified by:
connectin interfaceMcpTransport
-