DefDex in Codex
Add DefDex to the Codex CLI and IDE extension.
1. Set your key
Codex reads the key from this variable each time it connects; the key itself is never written to Codex’s config.
2. Add DefDex
Or add it to ~/.codex/config.toml yourself:
~/.codex/config.toml
3. Verify
Run codex mcp list, or /mcp inside a Codex session. defdex should list its tools.
4. Try it
Teach Codex the rules
Add the DefDex instructions to your project’s
AGENTS.md so Codex keeps dollar labels straight and cites sources.
Troubleshooting
- 401 Unauthorized.
DEFDEX_API_KEYwasn’t set in the shell that started Codex. Export it and restart. - Tools missing. Run
codex mcp listto confirm the server is enabled, then start a new session.
