Skip to main content

Interface: CreateInProcessCallApiArgs

Defined in: http-server-mcp-openapi/src/inProcessCallApi.ts:9

Properties​

app​

app: __module | (() => __module | Promise<__module>)

Defined in: http-server-mcp-openapi/src/inProcessCallApi.ts:15

The Koa app serving the REST API the tools were generated from, or a function returning it — for an app that mounts the MCP router itself and so is not built yet when the tools are registered.


headers?​

optional headers?: (request) => Record<string, string | undefined>

Defined in: http-server-mcp-openapi/src/inProcessCallApi.ts:20

Headers added to every dispatched request, after the ones the MCP request carried — e.g. a marker that tells a request log the call came from a tool.

Parameters​

ParameterType
requestResolvedRequest

Returns​

Record<string, string | undefined>


toError?​

optional toError?: (response, request) => Error

Defined in: http-server-mcp-openapi/src/inProcessCallApi.ts:25

Builds the error a non-2xx response throws. The default reads the message out of the common error envelopes (see errorMessageOf).

Parameters​

ParameterType
responseInProcessResponse
requestResolvedRequest

Returns​

Error