simplemem

Codex memory: connect simplemem to the Codex CLI

Updated November 2026

Add simplemem to OpenAI's Codex CLI as a Streamable HTTP MCP server with a bearer token, so Codex shares memory with Claude Code, Cursor, and your other tools.

How memory works in Codex today

Codex reads instructions from AGENTS.md files that you write. It also has an optional Memories feature, off by default, that stores notes locally in ~/.codex/memories_v2/. OpenAI recommends keeping rules that must always apply in AGENTS.md.

Both stay on your machine and in Codex. Claude Code, Cursor, and your agents cannot read them. simplemem gives Codex the same memory as those tools, and you can read and edit each entry in a dashboard.

Connect simplemem to Codex

  1. Sign in to simplemem with Google and generate an access key in the dashboard.
  2. Put the key in an environment variable, for example add export SIMPLEMEM_KEY="YOUR_ACCESS_KEY" to your shell profile and open a new terminal.
  3. Run codex mcp add simplemem --url https://simplemem.com/api/mcp --bearer-token-env-var SIMPLEMEM_KEY, or add the server to ~/.codex/config.toml by hand (config below).
  4. Run codex mcp list to check it is configured. In the Codex TUI, /mcp shows connected servers and tools.
  5. Ask Codex to remember something, then check the dashboard.

Configuration

~/.codex/config.toml
[mcp_servers.simplemem]
url = "https://simplemem.com/api/mcp"
bearer_token_env_var = "SIMPLEMEM_KEY"
Shell profile (e.g. ~/.zshrc)
export SIMPLEMEM_KEY="YOUR_ACCESS_KEY"

Replace YOUR_ACCESS_KEY with the key from your simplemem dashboard. Treat it like a password.

Notes

  • Codex sends the variable's value as Authorization: Bearer <value>, so the variable holds only the key.
  • Older guides mention experimental_use_rmcp_client. Current Codex versions do not need it.

What your assistant will save

Nothing is saved automatically. Codex writes a memory only when it calls add_memory, usually because you asked it to remember something. Each memory is one short line, and the dashboard shows which tool saved it:

  • Prefers Go for CLIs and Python for data scripts.via Codex
  • Runs Postgres 16 locally in Docker on port 5433.via Codex
  • Wants diffs explained in one sentence each.via Codex

You can read, search, edit, delete, and export every memory from the dashboard.

Endpoint

Use https://simplemem.com/api/mcp (Streamable HTTP) with Authorization: Bearer YOUR_ACCESS_KEY. The server has four tools: get_memories, add_memory, update_memory, and delete_memory. See the API reference.

FAQ

Does Codex have memory?

Codex has AGENTS.md instructions and an optional local Memories feature. Both stay on your machine and in Codex.

Why use an environment variable for the key?

Codex's bearer_token_env_var reads the token from the environment, so the key never sits in config.toml.

Can Codex and Claude Code share memory?

Yes. Connect both to simplemem with keys from the same account. See the Claude Code guide.

Try simplemem

Sign in with Google, generate an access key, and connect your first AI tool. Free for 100 memories. Pro is $5/month or $48/year.