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

Function initialize

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 2

rpcFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected