developers.openai.com/codex/mcp (retrieved 2026-10-10). The command codex mcp add <name> --url <url> and the [mcp_servers.<name>] table are both documented there. Live connection: NOT TESTED against the published endpoint, which is not deployed yet.
Codex stores MCP configuration in ~/.codex/config.toml by default. The ChatGPT desktop app, the Codex CLI, and the IDE extension share that file.
Add the server
Restrict the tools (recommended)
Codex supports an allow-list throughenabled_tools. Use the tool names your session reports, because the live endpoint decides them. The placeholder below must be replaced before use:
disabled_tools is applied after enabled_tools and works as a deny-list.
Verify
/mcp to see the active servers. Then ask Codex a question the documentation answers.
Troubleshooting
- Server not listed: check the table name, including the hyphen, and that the file is the one Codex reads.
- Startup fails: the default startup timeout is 10 seconds. Raise
startup_timeout_secif the site is slow. - Unexpected tools: add
enabled_tools.
Remove
Delete the[mcp_servers.metatron-docs] table from config.toml, then start a new session. The public Codex documentation does not list a remove subcommand.