Skip to main content

OpenAI Codex

← Back to Agent Skills

Config file: ~/.codex/config.toml


Configuration​

Add to your ~/.codex/config.toml:

[mcp_servers.audaxic-memory]
url = "https://memory-mcp.audaxic.com/mcp"
bearer_token_env_var = "AUDAXIC_API_KEY"

Set the environment variable:

export AUDAXIC_API_KEY="ak_your_api_key_here"

Option 2: Static header​

[mcp_servers.audaxic-memory]
url = "https://memory-mcp.audaxic.com/mcp"
http_headers = { "Authorization" = "Bearer ak_your_api_key_here" }

Setup via CLI​

# Add the server
codex mcp add audaxic-memory --url https://memory-mcp.audaxic.com/mcp --bearer-token-env-var AUDAXIC_API_KEY

# List configured servers
codex mcp list

Setup via ChatGPT Desktop App​

  1. Open Settings → MCP servers
  2. Click Add server
  3. Enter:
    • Name: audaxic-memory
    • URL: https://memory-mcp.audaxic.com/mcp
    • Bearer token env var: AUDAXIC_API_KEY

Setup via IDE Extension​

  1. Click Gear menu → MCP servers
  2. Click Add server
  3. Enter the same details as above

Verify​

In the Codex TUI, type /mcp to see active MCP servers.


Notes​

  • Codex uses TOML configuration (not JSON)
  • CLI and Desktop share the same ~/.codex/config.toml file
  • Supports Streamable HTTP transport
  • Environment variable approach is recommended for security

Behavioral Triggers​

The Codex agent will automatically:

AUTO-SEARCH before:​

  • Making architectural decisions
  • Adding new dependencies
  • Fixing bugs (check for prior solutions)
  • Starting new sessions (load preferences)

AUTO-SAVE after:​

  • User states a preference
  • Decision with rationale made
  • Complex bug fixed
  • Project conventions learned

DO NOT save:​

  • Temporary state, debug info, secrets

MCP Tools​

  • add_memory — text (required), user_id?, metadata?
  • search_memories — query (required), user_id?, limit?
  • get_memories — user_id?, limit?
  • delete_memory — memory_ids[] (required)
  • delete_all_memories — user_id?

Content Rules​

  • One fact per memory
  • Natural language, not keywords
  • Include reasoning, not just outcomes
  • Be specific for better semantic matching

Lifecycle​

Add → Search → Update (delete + re-add) → Delete (when obsolete)