Skip to navigation
Connect your agentDefDex in Codex

DefDex in Codex

Add DefDex to the Codex CLI and IDE extension.

1. Set your key

export DEFDEX_API_KEY="YOUR_API_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

codex mcp add defdex --url https://app.defdex.io/mcp --bearer-token-env-var DEFDEX_API_KEY

Or add it to ~/.codex/config.toml yourself:

~/.codex/config.toml
[mcp_servers.defdex]
url = "https://app.defdex.io/mcp"
bearer_token_env_var = "DEFDEX_API_KEY"

3. Verify

Run codex mcp list, or /mcp inside a Codex session. defdex should list its tools.

4. Try it

Use DefDex to find SBIR awards to companies working on hypersonics since FY2023, and list the awarding offices.

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_KEY wasn’t set in the shell that started Codex. Export it and restart.
  • Tools missing. Run codex mcp list to confirm the server is enabled, then start a new session.