MCPcopy Create free account
hub / github.com/modelcontextprotocol/ext-apps / connect

Function connect

examples/pdf-server/server.test.ts:1126–1132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1124 // Command queues are MODULE-LEVEL (shared across server instances), so each
1125 // test uses a distinct viewUUID to avoid cross-test interference.
1126 async function connect() {
1127 const server = createServer({ enableInteract: true });
1128 const client = new Client({ name: "t", version: "1" });
1129 const [ct, st] = InMemoryTransport.createLinkedPair();
1130 await Promise.all([server.connect(st), client.connect(ct)]);
1131 return { server, client };
1132 }
1133
1134 // Helper: poll with an outer deadline so a failing test doesn't hang for the
1135 // full 30s long-poll. Safe ONLY when a command is already enqueued — poll

Callers 1

server.test.tsFile · 0.70

Calls 2

createServerFunction · 0.90
connectMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…