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

Function layerHttpRouter

packages/ai/ai/src/McpServer.ts:629–641  ·  view source on GitHub ↗
(options: {
  readonly name: string
  readonly version: string
  readonly path: HttpRouter.PathInput
})

Source from the content-addressed store, hash-verified

627 * @category Layers
628 */
629export const layerHttpRouter = (options: {
630 readonly name: string
631 readonly version: string
632 readonly path: HttpRouter.PathInput
633}): Layer.Layer<
634 McpServer | McpServerClient,
635 never,
636 HttpLayerRouter.HttpRouter
637> =>
638 layer(options).pipe(
639 Layer.provide(RpcServer.layerProtocolHttpRouter(options)),
640 Layer.provide(RpcSerialization.layerJsonRpc())
641 )
642
643/**
644 * Register an AiToolkit with the McpServer.

Callers

nothing calls this directly

Calls 3

layerFunction · 0.70
pipeMethod · 0.65
provideMethod · 0.65

Tested by

no test coverage detected