Codex CLI Setup
Add Memcone memory to the OpenAI Codex CLI in under 60 seconds.
Automatic setup (recommended)
Run this in your project directory:
npx @memcone/cli linknpx @memcone/cli linklink detects Codex CLI and writes the MCP config automatically. Restart Codex and you're done.
You need a Memcone API key from dashboard → API keys. The CLI will prompt for it on first run and save it to ~/.memcone/credentials.
Manual config
Use the Codex MCP CLI:
export MEMCONE_API_KEY="mem_live_…" # raw key; Codex sets Authorization
codex mcp add memcone --url https://memcone.com/api/mcp --bearer-token-env-var MEMCONE_API_KEYexport MEMCONE_API_KEY="mem_live_…" # raw key; Codex sets Authorization
codex mcp add memcone --url https://memcone.com/api/mcp --bearer-token-env-var MEMCONE_API_KEYVerify with:
codex mcp list
codex mcp get memconecodex mcp list
codex mcp get memconeOr edit ~/.codex/config.toml directly:
[mcp_servers.memcone]
url = "https://memcone.com/api/mcp"
http_headers = { Authorization = "Bearer mem_live_YOUR_KEY_HERE" }[mcp_servers.memcone]
url = "https://memcone.com/api/mcp"
http_headers = { Authorization = "Bearer mem_live_YOUR_KEY_HERE" }(http_headers is the documented field for static headers; the CLI does not support --header on codex mcp add.)
Using it
Codex calls Memcone automatically during sessions:
memcone.context— injects your project identity, rules, and past session memorymemcone.remember— stores facts the agent learnsmemcone.recall— searches past memory on demand
"Remember that this repo uses ESM modules, not CommonJS"
"What do you know about my preferred testing approach?"
Troubleshooting
codex mcp list doesn't show memcone
→ Re-run codex mcp add or check your config.toml.
401 Unauthorized
→ Verify your key at dashboard → API keys. It must start with mem_live_.
No memory returned → Nothing is stored yet. Tell Codex: "Remember that this project uses TypeScript and Vitest". Confirm at dashboard → Memory.