Skip to main content

Overview

Connect Operator to OpenAI Codex so your agent can call a dedicated, adaptive search backend whenever it needs fresh documentation, regression details, or real-world implementation examples. Operator runs difficulty-aware, adaptive multi-source searches and returns concise answers that Codex can use directly in your workflows. While Codex is strong at reasoning about your code, Operator specializes in hunting down the right external sources such as recent GitHub issues, migration guides, or updated API docs, and feeding them back into the agent so it can stay unblocked.

Overview: Operator as an MCP server

Codex supports connecting to remote Model Context Protocol (MCP) servers. Operator exposes a hosted MCP endpoint you can add as a server named operator. The Operator MCP server supports two transport methods:
  • Streamable HTTP (recommended): https://mcp.operator.io/mcp
  • SSE (legacy): https://mcp.operator.io/sse
Each developer configures their own Operator API key in Codex. You can create and manage your key at operator.io.

MCP configuration for Codex

Follow the Codex documentation for connecting to remote MCP servers, and use the Operator HTTP endpoint as the server URL. A typical configuration uses a server ID like operator and looks like:
{
  "mcpServers": {
    "operator": {
      "url": "https://mcp.operator.io/mcp",
      "headers": {
        "Authorization": "Bearer ${OPERATOR_API_KEY}"
      }
    }
  }
}
Set OPERATOR_API_KEY in your environment before launching Codex:
export OPERATOR_API_KEY="sk_your_api_key_here"
If you prefer SSE, change the url to https://mcp.operator.io/sse. You can also send the API key using an x-api-key header instead of Authorization:
{
  "mcpServers": {
    "operator": {
      "url": "https://mcp.operator.io/mcp",
      "headers": {
        "x-api-key": "${OPERATOR_API_KEY}"
      }
    }
  }
}
Consult the Codex MCP documentation for any client-specific fields or options; the key pieces are the Operator MCP URL and the per-user API key header.