Skip to content

McpServerConfig

Defined in: src/mcp-config.ts:10

Configuration for a single MCP server entry in a config file or object.

Provide either command (stdio transport) or url (streamable-http/SSE), not both. When transport is omitted, it is auto-detected from the fields present.

optional command?: string;

Defined in: src/mcp-config.ts:12

Command to spawn (stdio transport, supports ${VAR} or ${env:VAR} interpolation).


optional args?: string[];

Defined in: src/mcp-config.ts:14

Arguments passed to the command (supports ${VAR} or ${env:VAR} interpolation).


optional env?: Record<string, string>;

Defined in: src/mcp-config.ts:16

Environment variables passed to the child process (supports ${VAR} or ${env:VAR} interpolation).


optional cwd?: string;

Defined in: src/mcp-config.ts:18

Working directory for the spawned process (supports ${VAR} or ${env:VAR} interpolation).


optional url?: string;

Defined in: src/mcp-config.ts:20

Server endpoint URL (streamable-http or SSE transport, supports ${VAR} or ${env:VAR} interpolation).


optional headers?: Record<string, string>;

Defined in: src/mcp-config.ts:22

HTTP headers sent with every request (supports ${VAR} or ${env:VAR} interpolation).


optional transport?: "stdio" | "sse" | "streamable-http";

Defined in: src/mcp-config.ts:24

Explicit transport type. When omitted, auto-detected: command → stdio, url → streamable-http.


optional auth?: McpClientCredentials;

Defined in: src/mcp-config.ts:26

Client credentials for OAuth machine-to-machine auth (streamable-http only).


optional disabled?: boolean;

Defined in: src/mcp-config.ts:28

When true, this server is skipped during loadServers.


optional continueOnError?: boolean;

Defined in: src/mcp-config.ts:30

When true, config or connection failures skip this server instead of throwing.


optional tasksConfig?: TasksConfig;

Defined in: src/mcp-config.ts:32

Task-augmented tool execution configuration (experimental).