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

Function initialize

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

Source from the content-addressed store, hash-verified

535 body: JSON.stringify(body),
536 });
537 const initialize = async (id: number): Promise<string> => {
538 const init = await rpc(null, {
539 jsonrpc: "2.0",
540 id,
541 method: "initialize",
542 params: {
543 protocolVersion: "2025-03-26",
544 capabilities: {},
545 clientInfo: { name: "test", version: "1" },
546 },
547 });
548 expect(init.status).toBe(200);
549 const sessionId = init.headers.get("mcp-session-id");
550 expect(sessionId).toBeTruthy();
551 await rpc(sessionId, {
552 jsonrpc: "2.0",
553 method: "notifications/initialized",
554 });
555 return sessionId!;
556 };
557
558 const sessionA = await initialize(1);
559 const execute = await rpc(sessionA, {

Callers 1

Calls 2

rpcFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected