MCPTool
Configuration for an MCP (Model Context Protocol) server tool.
MCP tools are server-side proxied by OpenAI, requiring no local execution logic.
| Property | Type | Description |
|---|
allowed_tools? | string[] | Optional whitelist of tool names allowed from this server. |
headers? | Record<string, string> | Optional HTTP headers to include in MCP requests (e.g., API keys). |
require_approval? | "never" | "always" | Approval requirement for tool calls: 'never' (auto-approve) or 'always' (require approval). |
server_label | string | Human-readable label identifying the MCP server. |
server_url | string | Base URL of the MCP server endpoint. |
type | "mcp" | Tool type discriminator, must be 'mcp'. |