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

Function layerHttp

packages/ai/ai/src/McpServer.ts:610–619  ·  view source on GitHub ↗
(options: {
  readonly name: string
  readonly version: string
  readonly path: HttpRouter.PathInput
  readonly routerTag?: HttpRouter.HttpRouter.TagClass<I, string, any, any>
})

Source from the content-addressed store, hash-verified

608 * @category Layers
609 */
610export const layerHttp = <I = HttpRouter.Default>(options: {
611 readonly name: string
612 readonly version: string
613 readonly path: HttpRouter.PathInput
614 readonly routerTag?: HttpRouter.HttpRouter.TagClass<I, string, any, any>
615}): Layer.Layer<McpServer | McpServerClient> =>
616 layer(options).pipe(
617 Layer.provide(RpcServer.layerProtocolHttp(options)),
618 Layer.provide(RpcSerialization.layerJsonRpc())
619 )
620
621/**
622 * Run the McpServer, using HTTP for input and output.

Callers

nothing calls this directly

Calls 3

layerFunction · 0.70
pipeMethod · 0.65
provideMethod · 0.65

Tested by

no test coverage detected