From 87ae7ffc5a68c585ca5fc3e5468f2ac4df5a0f0e Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Fri, 11 Oct 2024 16:13:07 +0100 Subject: [PATCH] Add start() to Transport interface --- src/shared/transport.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/shared/transport.ts b/src/shared/transport.ts index b0eabe05..8c98b95a 100644 --- a/src/shared/transport.ts +++ b/src/shared/transport.ts @@ -4,6 +4,13 @@ import { JSONRPCMessage } from "../types.js"; * Describes the minimal contract for a MCP transport that a client or server can communicate over. */ export interface Transport { + /** + * Starts processing messages on the transport, including any connection steps that might need to be taken. + * + * This method should only be called after callbacks are installed, or else messages may be lost. + */ + start(): Promise; + /** * Sends a JSON-RPC message (request or response). */