Use FoxAPIs in Codex (OpenAI).
Codex, OpenAI's coding agent, can use a remote MCP server declared in its configuration file. FoxAPIs adds sourced people and company facts, paid per call in credits (nothing is charged when a call returns nothing): what it can answer, prices.
Connect FoxAPIs to Codex (OpenAI)
MCP address: https://foxapis.com/mcp (Streamable HTTP). Header: Authorization: Bearer YOUR_KEY. Your key starts with fxp_.
- Add the block below to Codex's configuration file (config.toml in its configuration folder).
- Export your key as FOXAPIS_KEY in the shell that starts Codex, then list its tools.
config.toml block
[mcp_servers.foxapis] url = "https://foxapis.com/mcp" bearer_token_env_var = "FOXAPIS_KEY"
Get a key at the sign-up page. The tools and the price of each call are listed on the MCP page; the REST reference is the developer docs and the whole API as a file is openapi.json.
Three Codex (OpenAI) prompts that name FoxAPIs
- Build a lead card: enrich the founder of acme.com with FoxAPIs and show the sourced fields.
- Use FoxAPIs to find a work email for Jane Example at acme.com, and say so when nothing is found instead of guessing.
- Add a "Check this company" button that calls FoxAPIs from the terminal and shows what it returns with its sources.
Keep the key safe in Codex (OpenAI)
- Call FoxAPIs from a backend or an edge function, and keep the key as a secret there. Never put it in code that runs in a visitor's browser.
- Set a monthly credit limit for the key on your account page before you share a project.
- If a key is ever pasted into a chat or a public file, delete it and create a new one.
A rules file for Codex (OpenAI)
A plain-text file for the agent that writes your code: the key stays a server-side secret, calls are made from the server, every fact keeps its source, an empty field stays empty, and one real call with its real answer. Download foxapis-agent-rules.txt.
Put its text where Codex (OpenAI) keeps standing instructions for a project (a rules or knowledge setting). The name and place of that setting are in Codex (OpenAI)'s own docs; we did not confirm them for this page.
Start Codex (OpenAI) from a template
Open-source starter apps that call FoxAPIs: a lead finder, a company check, a funding tracker and a Supabase edge function. Each one has a Deploy on Vercel link that asks for your key. foxapis-templates on GitHub
The one thing to know about Codex (OpenAI)
Not verified: we did not run Codex. The shape follows its documented MCP settings (a url and the name of an environment variable that holds the bearer token).
FoxAPIs is not affiliated with or endorsed by Codex (OpenAI). Config shapes are shown as that tool's own documentation describes them; where we did not run one, the page says so.