Skip to content

McpClientConfig

type McpClientConfig = McpClientOptions & {
transport?: McpTransport;
url?: string | URL;
auth?: McpClientCredentials;
authProvider?: OAuthClientProvider;
headers?: Record<string, string>;
};

Defined in: src/mcp.ts:105

Arguments for configuring an MCP Client.

NameTypeDescriptionDefined in
transport?McpTransportPre-constructed transport. Mutually exclusive with url.src/mcp.ts:107
url?string | URLServer URL. When provided, a StreamableHTTP transport is constructed automatically.src/mcp.ts:110
auth?McpClientCredentialsClient credentials for OAuth machine-to-machine auth. Requires url.src/mcp.ts:113
authProvider?OAuthClientProviderCustom OAuth provider for advanced auth flows. Requires url. Mutually exclusive with auth.src/mcp.ts:116
headers?Record<string, string>Custom headers to include on every request to the server. Requires url.src/mcp.ts:119