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.
What you get
Section titled “What you get”- The
remember,search,forget,validate_memory,gateway_callandmmw_sync_statustools 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.
Prerequisites
Section titled “Prerequisites”- An MMW API key (starts with
mmw_); see the Quickstart. - Codex with MCP server support.
- Python 3.11+ and uv (the
uvxcommand).
Where the config lives
Section titled “Where the config lives”~/.codex/config.toml~/.codex/config.toml%USERPROFILE%\.codex\config.toml-
Open
config.toml(create it if it does not exist). -
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" } -
Restart Codex.
Verify
Section titled “Verify”-
In the Codex interface type
/mcp(or runcodex mcp listin a terminal, in versions that have this command). Themmwserver should be listed withremember,search,forget,validate_memory,gateway_callandmmw_sync_status. -
Ask:
Remember in MMW: staging is deployed with the systemd unit app-staging. Fact key: deploy-staging.Codex calls
rememberand reports the record ID with theunverifiedstatus. -
In a new session ask:
How do we deploy staging? Check MMW.Expected answer: Codex calls
searchand replies that staging is deployed withapp-staging.
Session history (optional)
Section titled “Session history (optional)”The agent can upload your Codex session history, but only after a person confirms consent in an interactive terminal:
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 consentTo 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.