Skip to content

McpClientOptions

Defined in: src/mcp/client.ts:254

Behavioral options shared by all MCP client configurations.

  • RuntimeConfig
applicationName?: string;

Defined in: src/mcp/client.ts:81

RuntimeConfig.applicationName


applicationVersion?: string;

Defined in: src/mcp/client.ts:82

RuntimeConfig.applicationVersion


disableMcpInstrumentation?: boolean;

Defined in: src/mcp/client.ts:256

Disable OpenTelemetry MCP instrumentation.


prefix?: string;

Defined in: src/mcp/client.ts:259

Prefix for agent-facing tool names, applied as <prefix>_<toolName>.


toolFilters?: McpToolFilters;

Defined in: src/mcp/client.ts:262

Filters controlling which tools this client exposes.


tasksConfig?: TasksConfig;

Defined in: src/mcp/client.ts:265

Enables automatic execution for legacy task tools. Experimental: subject to change.


listMaxPages?: number;

Defined in: src/mcp/client.ts:268

Page cap for the no-token list methods, which aggregate every page. 0 disables the cap. Defaults to the MCP client’s 64.


progressCallback?: McpProgressCallback;

Defined in: src/mcp/client.ts:276

Callback for progress notifications during tool calls, including calls an agent makes. Not delivered for calls the server runs as a task (tasksConfig with a task-capable server). The total and message fields may be absent when the server does not provide them. A per-call progressCallback takes precedence.


elicitationCallback?: ElicitationCallback;

Defined in: src/mcp/client.ts:283

Callback to handle server-initiated elicitation requests. When provided, the client advertises elicitation support (form + url modes) and routes incoming elicitation requests to this callback.


continueOnError?: boolean;

Defined in: src/mcp/client.ts:286

When true, connection failures and overlong prefixed names during tool listing are skipped with warnings.


logHandler?: (params) => void;

Defined in: src/mcp/client.ts:289

Called when the server emits a log message. Defaults to routing through the Strands logger.

ParameterType
paramsLoggingMessageNotificationParams

void