Skip to main content

Interface: MCPTool

Configuration for an MCP (Model Context Protocol) server tool. MCP tools are server-side proxied by OpenAI, requiring no local execution logic.

Extends

  • Record<string, unknown>

Properties

allowed_tools?

optional allowed_tools: string[];

Optional whitelist of tool names allowed from this server.


headers?

optional headers: Record<string, string>;

Optional HTTP headers to include in MCP requests (e.g., API keys).


require_approval?

optional require_approval: "never" | "always";

Approval requirement for tool calls: 'never' (auto-approve) or 'always' (require approval).


server_label

server_label: string;

Human-readable label identifying the MCP server.


server_url

server_url: string;

Base URL of the MCP server endpoint.


type

type: "mcp";

Tool type discriminator, must be 'mcp'.