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:104

Arguments for configuring an MCP Client.

| Name | Type | Description | Defined in | | --------------- | -------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | transport? | McpTransport | Pre-constructed transport. Mutually exclusive with url. | src/mcp.ts:106 | | url? | string | URL | Server URL. When provided, a StreamableHTTP transport is constructed automatically. | src/mcp.ts:109 | | auth? | McpClientCredentials | Client credentials for OAuth machine-to-machine auth. Requires url. | src/mcp.ts:112 | | authProvider? | OAuthClientProvider | Custom OAuth provider for advanced auth flows. Requires url. Mutually exclusive with auth. | src/mcp.ts:115 | | headers? | Record<string, string> | Custom headers to include on every request to the server. Requires url. | src/mcp.ts:118 |