MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / initialize

Function initialize

apps/host-cloudflare/src/worker.e2e.node.test.ts:442–461  ·  view source on GitHub ↗
(id: number)

Source from the content-addressed store, hash-verified

440 body: JSON.stringify(body),
441 });
442 const initialize = async (id: number): Promise<string> => {
443 const init = await rpc(null, {
444 jsonrpc: "2.0",
445 id,
446 method: "initialize",
447 params: {
448 protocolVersion: "2025-03-26",
449 capabilities: {},
450 clientInfo: { name: "test", version: "1" },
451 },
452 });
453 expect(init.status).toBe(200);
454 const sessionId = init.headers.get("mcp-session-id");
455 expect(sessionId).toBeTruthy();
456 await rpc(sessionId, {
457 jsonrpc: "2.0",
458 method: "notifications/initialized",
459 });
460 return sessionId!;
461 };
462
463 const sessionA = await initialize(1);
464 const execute = await rpc(sessionA, {

Callers 1

Calls 2

rpcFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected