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

Function initialize

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

Source from the content-addressed store, hash-verified

395 body: JSON.stringify(body),
396 });
397 const initialize = async (id: number): Promise<string> => {
398 const init = await rpc(null, {
399 jsonrpc: "2.0",
400 id,
401 method: "initialize",
402 params: {
403 protocolVersion: "2025-03-26",
404 capabilities: {},
405 clientInfo: { name: "test", version: "1" },
406 },
407 });
408 expect(init.status).toBe(200);
409 const sessionId = init.headers.get("mcp-session-id");
410 expect(sessionId).toBeTruthy();
411 await rpc(sessionId, {
412 jsonrpc: "2.0",
413 method: "notifications/initialized",
414 });
415 return sessionId!;
416 };
417
418 const sessionA = await initialize(1);
419 const execute = await rpc(sessionA, {

Callers 1

Calls 2

rpcFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected