Browse documentation
Codex CLI
TOML rather than JSON, and a bridge if your build predates remote servers.
Configuration
Codex reads ~/.codex/config.toml. Servers go under mcp_servers.
Recent versions can connect to a Streamable HTTP server directly:
[mcp_servers.unlob]
url = "https://api.unlob.com/mcp"
[mcp_servers.unlob.http_headers]
"x-api-key" = "ulb_…"
Remote-server support and the exact spelling of these keys have changed as Codex has
evolved, so check your own codex --version and its documentation before assuming the
above. If it does not take, the bridge below works on every version.
The bridge
[mcp_servers.unlob]
command = "npx"
args = ["-y", "mcp-remote", "https://api.unlob.com/mcp", "--header", "x-api-key:${UNLOB_API_KEY}"]
[mcp_servers.unlob.env]
UNLOB_API_KEY = "ulb_…"
No space after the colon in the header argument — argument splitting eats it.
Check it
codex mcp list
The server should be listed with its tools. Inside a session, ask Codex what tools it has.
Why this one matters
Codex is a strict MCP client. It is the client that finds handshake bugs other clients
paper over — if it registers zero tools against a server, that server has a real
conformance problem, not a Codex problem. Against api.unlob.com it should register
eleven; if it does not, tell us rather than working around it.
Next
- MCP overview — the lifecycle Codex is strict about
- Troubleshooting