MCPcopy Index your code
hub / github.com/modelcontextprotocol/typescript-sdk / createLinkedPair

Method createLinkedPair

src/inMemory.ts:25–31  ·  view source on GitHub ↗

* Creates a pair of linked in-memory transports that can communicate with each other. One should be passed to a Client and one to a Server.

()

Source from the content-addressed store, hash-verified

23 * Creates a pair of linked in-memory transports that can communicate with each other. One should be passed to a Client and one to a Server.
24 */
25 static createLinkedPair(): [InMemoryTransport, InMemoryTransport] {
26 const clientTransport = new InMemoryTransport();
27 const serverTransport = new InMemoryTransport();
28 clientTransport._otherTransport = serverTransport;
29 serverTransport._otherTransport = clientTransport;
30 return [clientTransport, serverTransport];
31 }
32
33 async start(): Promise<void> {
34 // Process any messages that were queued before start was called

Callers 10

inMemory.test.tsFile · 0.80
index.test.tsFile · 0.80
index.test.tsFile · 0.80
testElicitationFlowFunction · 0.80
title.test.tsFile · 0.80
mcp.test.tsFile · 0.80

Calls

no outgoing calls

Tested by 1

testElicitationFlowFunction · 0.64