Skip to content

On this page you will connect MMW to Codex through config.toml, verify the connection and, if you want, turn on Codex session history upload.

  • The remember, search, forget, validate_memory, gateway_call and mmw_sync_status tools in Codex.
  • Codex session history upload, only after you explicitly consent in a terminal.
  • Memory shared with Claude Code, Cursor and claude.ai when you use the same key.
  • An MMW API key (starts with mmw_); see the Quickstart.
  • Codex with MCP server support.
  • Python 3.11+ and uv (the uvx command).
~/.codex/config.toml
  1. Open config.toml (create it if it does not exist).

  2. Add this section:

    ~/.codex/config.toml
    [mcp_servers.mmw]
    command = "uvx"
    args = ["--from", "https://app.mmwhub.tech/downloads/mmw-agent/mmw_agent-0.1.4-py3-none-any.whl", "mmw-agent"]
    env = { MMW_API_KEY = "mmw_your_key", MMW_ENDPOINT = "https://mcp.mmwhub.tech" }
  3. Restart Codex.

  1. In the Codex interface type /mcp (or run codex mcp list in a terminal, in versions that have this command). The mmw server should be listed with remember, search, forget, validate_memory, gateway_call and mmw_sync_status.

  2. Ask:

    Remember in MMW: staging is deployed with the systemd unit app-staging. Fact key: deploy-staging.

    Codex calls remember and reports the record ID with the unverified status.

  3. In a new session ask:

    How do we deploy staging? Check MMW.

    Expected answer: Codex calls search and replies that staging is deployed with app-staging.

The agent can upload your Codex session history, but only after a person confirms consent in an interactive terminal:

Terminal window
MMW_API_KEY=mmw_your_key MMW_ENDPOINT=https://mcp.mmwhub.tech \
uvx --from https://app.mmwhub.tech/downloads/mmw-agent/mmw_agent-0.1.4-py3-none-any.whl mmw-agent consent

To withdraw consent, run the same command with revoke instead of consent: uploads stop immediately. From inside Codex you can check the state with the mmw_sync_status tool.

Model reasoning, system prompts, file snapshots and paths are never uploaded; secrets are removed on your computer before sending and once more on the server. Search over uploaded sessions is not available yet. See Session history.