MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / startWithFactory

Function startWithFactory

mcp/tests/http.test.ts:365–376  ·  view source on GitHub ↗
(
      factory: (bearer: string, o?: { agentEmail?: string; scope?: string }) => McpClient,
    )

Source from the content-addressed store, hash-verified

363 }
364
365 async function startWithFactory(
366 factory: (bearer: string, o?: { agentEmail?: string; scope?: string }) => McpClient,
367 ) {
368 await close();
369 const { close: c, port } = await startHttpServer(0, {
370 baseUrl: "http://e2a.local",
371 allowedHosts: ["127.0.0.1", "localhost"],
372 clientFactory: factory as never,
373 });
374 close = c;
375 url = `http://127.0.0.1:${port}/mcp`;
376 }
377
378 it("agent scope pins the credential-bound agent from whoami", async () => {
379 const probe = makeProbeClient({ scope: "agent", agentAddress: "solo@bot.example.com" });

Callers 1

http.test.tsFile · 0.85

Calls 1

startHttpServerFunction · 0.85

Tested by

no test coverage detected