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

Function initialize

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 2

rpcFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected