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.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description | Defined in |
|---|---|---|---|
transport? | McpTransport | Pre-constructed transport. Mutually exclusive with url. | src/mcp.ts:107 |
url? | string | URL | Server URL. When provided, a StreamableHTTP transport is constructed automatically. | src/mcp.ts:110 |
auth? | McpClientCredentials | Client credentials for OAuth machine-to-machine auth. Requires url. | src/mcp.ts:113 |
authProvider? | OAuthClientProvider | Custom 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 |