Skip to main content
Codex supports remote MCP servers over Streamable HTTP natively, so no proxy or npx command is needed.

Quick install

On the server’s Integration tab, select Codex and copy the command from Quick install:
For API key servers, the command adds --bearer-token-env-var MCPCORE_API_KEY. Codex then reads the key from the MCPCORE_API_KEY environment variable every time it connects, and the key is never written to config.toml:
For OAuth servers, run codex mcp login my_server after adding it.

Add the server by hand

Open ~/.codex/config.toml (create it if it doesn’t exist) and add a block for your server. Copy the ready-made snippet from the Integration tab of your server in the dashboard, or write it by hand:
The table name after mcp_servers. is the server name Codex shows. Use letters, numbers, _ or -.

Verify

Restart Codex and run:
Your server should be listed. Ask Codex to use one of your tools to confirm it works.
Keep API keys out of version control. If you share config.toml across machines, store the key in an environment variable and reference it with bearer_token_env_var = "MCPCORE_API_KEY" instead of http_headers.