# apifare for OpenAI Codex CLI One prepaid, capped key for every API your agent needs, under hard caps and a kill switch. 1. Get a token: https://apifare.com/start?origin=page:integrations-codex (shown once). 2. Run this once. It writes an [mcp_servers.apifare] table to ~/.codex/config.toml, which the Codex CLI, the Codex IDE extension, and the ChatGPT desktop app share. ``` codex mcp add apifare --env APIPAY_TOKEN= -- npx -y apifare-mcp ``` Replace with your token. Check it with codex mcp list, then start codex. Inside Codex, /mcp shows your active servers. 3. Try it: "search the web for X", then "fetch a URL", then "what's the weather in London". 4. Caps and the kill switch are checked before dispatch. An empty balance returns HTTP 402 with a top-up link (see /errors.md). Prices: https://apifare.com/capabilities. Config checked against https://learn.chatgpt.com/docs/extend/mcp?surface=cli on 2026-09-12.