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

Function withServer

packages/plugins/mcp/src/sdk/probe-shape.test.ts:50–56  ·  view source on GitHub ↗
(handler: ProbeHandler, use: (endpoint: string) => Effect.Effect<A, E>)

Source from the content-addressed store, hash-verified

48 });
49
50const withServer = <A, E>(handler: ProbeHandler, use: (endpoint: string) => Effect.Effect<A, E>) =>
51 Effect.scoped(
52 Effect.gen(function* () {
53 const server = yield* serveProbeEndpoint(handler);
54 return yield* use(server.endpoint);
55 }),
56 );
57
58describe("probeMcpEndpointShape", () => {
59 it.effect("classifies 2xx as unauth-OK MCP", () =>

Callers 1

Calls 2

serveProbeEndpointFunction · 0.85
useFunction · 0.70

Tested by

no test coverage detected