Connect Codex
Add Spec0
In a terminal:
codex mcp add --http spec0 http://127.0.0.1:7474/mcpCodex writes the entry to ~/.codex/config.toml. The next session reads it.
Or edit the TOML
Open ~/.codex/config.toml (or .codex/config.toml in a trusted project root for a per-project scope) and add:
[mcp_servers.spec0]url = "http://127.0.0.1:7474/mcp"startup_timeout_sec = 30tool_timeout_sec = 60enabled = trueBearer tokens and custom headers (bearer_token_env_var, http_headers) have their own keys if you need them — Spec0 doesn’t, since it only accepts local-loopback connections.
Verify the connection
In a Codex session:
> please call spec0_whoamiA successful response identifies your harness as codex and assigns you a stable agent id (agn_…). That’s the same id Spec0 will use to track your claims across sessions.
Manage
codex mcp list # show all configured serverscodex mcp get spec0 # show one server's detailscodex mcp remove spec0 # disconnectThe codex mcp subcommands also walk you through OAuth flows for remote servers that need them — irrelevant for Spec0, included for completeness.