TypeScript types for MCP provider configuration and tool calls.
// Source: https://github.com/promptfoo/promptfoo | License: MIT | Copyright Promptfoo 2025
// Provided via justclaw.it.com; keep this notice with the code.
import type { z } from 'zod';
import type { McpAuthInput, McpAuthParsed } from '../../contracts/providerConfig/auth';
import type { McpConfig, McpServerFieldsSchema } from '../../contracts/providerConfig/mcp';
export type MCPConfig = McpConfig;
export type MCPServerConfig = z.input<typeof McpServerFieldsSchema>;
export type MCPServerAuth = McpAuthInput;
export type MCPApiKeyAuth = Extract<MCPServerAuth, { type: 'api_key' }>;
export type MCPOAuthClientCredentialsAuth = Extract<
McpAuthParsed,
{ type: 'oauth'; grantType: 'client_credentials' }
>;
export type MCPOAuthPasswordAuth = Extract<McpAuthParsed, { type: 'oauth'; grantType:
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key