MCPcopy
hub / github.com/Effect-TS/effect / layer

Function layer

packages/ai/ai/src/McpServer.ts:468–474  ·  view source on GitHub ↗
(options: {
  readonly name: string
  readonly version: string
})

Source from the content-addressed store, hash-verified

466 * @category Layers
467 */
468export const layer = (options: {
469 readonly name: string
470 readonly version: string
471}): Layer.Layer<McpServer | McpServerClient, never, RpcServer.Protocol> =>
472 Layer.scopedDiscard(Effect.forkScoped(run(options))).pipe(
473 Layer.provideMerge(McpServer.layer)
474 )
475
476/**
477 * Run the McpServer, using stdio for input and output.

Callers 3

layerStdioFunction · 0.70
layerHttpFunction · 0.70
layerHttpRouterFunction · 0.70

Calls 2

pipeMethod · 0.65
runFunction · 0.50

Tested by

no test coverage detected