Skip to content

basalt / mcp/src / McpPluginOptions

Interface: McpPluginOptions ​

Defined in: mcp/src/server.ts:123

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 ​

filter? ​

> optional filter?: (route) => boolean

Defined in: mcp/src/server.ts:127

Parameters ​

route ​

BasaltRoute

Returns ​

boolean


forwardHeaders? ​

> optional forwardHeaders?: string[]

Defined in: mcp/src/server.ts:133

Extra request headers a tool call inherits from the /mcp request (or the callTool headers), on top of DEFAULT_FORWARDED_HEADERS — e.g. a custom tenant header. Everything not listed is dropped.


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 ​

ToolErrorOptions.reportError


routes ​

> routes: BasaltRoute[]

Defined in: mcp/src/server.ts:125

The routes to scan for meta.mcp — typically the same array you pass the adapter.


serverInfo? ​

> optional serverInfo?: McpServerInfo

Defined in: mcp/src/server.ts:126

Released under the MIT License.