Skip to content

Commit 87ae7ff

Browse files
committed
Add start() to Transport interface
1 parent 73c66f4 commit 87ae7ff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/shared/transport.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ import { JSONRPCMessage } from "../types.js";
44
* Describes the minimal contract for a MCP transport that a client or server can communicate over.
55
*/
66
export interface Transport {
7+
/**
8+
* Starts processing messages on the transport, including any connection steps that might need to be taken.
9+
*
10+
* This method should only be called after callbacks are installed, or else messages may be lost.
11+
*/
12+
start(): Promise<void>;
13+
714
/**
815
* Sends a JSON-RPC message (request or response).
916
*/

0 commit comments

Comments
 (0)