Fixes · Checked on 2026-10-03, with codex-cli 0.155
Codex doesn't list the MCP server you added
Usually the right config in the wrong file.
The symptom
You add a server to a config.toml, and codex mcp list doesn't show it, or
codex mcp get <name> can't find it.
Why it happens
Codex reads its user config from config.toml in $CODEX_HOME, which is
~/.codex unless you set CODEX_HOME. A config.toml in your home folder
itself is never read, and neither is ~/.codex when CODEX_HOME points elsewhere.
The table name matters too. Codex wants [mcp_servers.<name>], not the
mcpServers key that JSON configs for other agents use.
The fix
Let Codex write the entry itself, then check it's there:
codex mcp add <name> -- <command> [args...]
codex mcp list
To see which folder Codex reads, print $CODEX_HOME; empty means ~/.codex. For DMN's
own server, dmn mcp-init --apply --agent codex writes the entry for you. More on
DMN for Codex.
How DMN learned it
It came up, and was fixed, in 2 of our own sessions. DMN kept the fix as one line:
If `codex mcp get/list` can't find a server you wrote to TOML, Codex reads $CODEX_HOME/config.toml (default
~/.codex), not $HOME; register it with `codex mcp add` so the schema is right.
DMN reads your agents' past sessions on your machine. When the same error is fixed the same way in two or more of them, it keeps the fix as a one-line lesson. When the error turns up again, Claude Code is told the fix straight away, and any agent can search what earlier sessions found. How DMN keeps what agents learn.