basalt / mcp/src / McpServerOptions
Interface: McpServerOptions
Defined in: mcp/src/server.ts:26
How a tool call's failure is shaped for the model and reported to the operator. The trust boundary: a thrown error reaches the MCP client — a language model, and whoever can read or steer its context — as the same { code, message, details? } an HTTP client gets, so details passes through redactErrorDetails on the way out, and internalDetails never leaves: it goes to reportError only.
Extends
Properties
container
> container: Container
Defined in: mcp/src/server.ts:28
filter?
> optional filter?: (route) => boolean
Defined in: mcp/src/server.ts:30
Parameters
route
Returns
boolean
forwardHeaders?
> optional forwardHeaders?: string[]
Defined in: mcp/src/server.ts:32
Extra request headers a tool call inherits, on top of DEFAULT_FORWARDED_HEADERS.
redactErrorDetails?
> optional redactErrorDetails?: false | ErrorDetailsRedactor
Defined in: mcp/src/tools.ts:144
Filters an error's public details before they enter a tool result. Default: redactSensitiveDetails from @basaltkit/http — the value of every key that names a secret (password, token, apiKey, secret, sessionId, …) becomes '[REDACTED]'. Pass your own, or false to send the details exactly as an HTTP client receives them. A route can override it with meta.mcp: { redactErrorDetails }.
Inherited from
ToolErrorOptions.redactErrorDetails
reportError?
> optional reportError?: false | HttpErrorReporter
Defined in: mcp/src/tools.ts:151
Receives every error a tool call throws, with the error object untouched (its log-only internalDetails included) — the same contract as the adapters' onError. Default: httpErrorReporter() (5xx to console.error, 4xx to console.warn). false reports nothing.
Inherited from
routes
> routes: BasaltRoute[]
Defined in: mcp/src/server.ts:27
serverInfo?
> optional serverInfo?: McpServerInfo
Defined in: mcp/src/server.ts:29