Connect Codex directly to MMW without a local agent. Use the optional local route below only for stdio or separately consented history sync.
Direct MCP
Section titled “Direct MCP”Add this to ~/.codex/config.toml:
[mcp_servers.mmw]url = "https://mcp.mmwhub.tech/mcp"bearer_token_env_var = "MMW_API_KEY"The secret stays out of TOML. Enter it locally and launch Codex from that environment:
read -rsp 'MMW API key: ' MMW_API_KEY; echoexport MMW_API_KEYcodexFor PowerShell:
$secret = Read-Host 'MMW API key' -AsSecureString$env:MMW_API_KEY = [System.Net.NetworkCredential]::new('', $secret).PasswordcodexRemove-Item Env:MMW_API_KEYAlternatively configure the server with codex mcp add mmw --url https://mcp.mmwhub.tech/mcp --bearer-token-env-var MMW_API_KEY. The running Codex process must inherit the variable; a separately launched GUI may not. See the official MCP reference.
Optional local agent
Section titled “Optional local agent”For stdio or consented session sync, use Python 3.11+ and uv:
MMW_ENDPOINT=https://mcp.mmwhub.tech uvx --from https://app.mmwhub.tech/downloads/mmw-agent/mmw_agent-0.1.14-py3-none-any.whl mmw-agent setupSetup prompts for the key locally. A person must separately approve history uploads; shared notes do not require that consent. Session history.
Check the connection
Section titled “Check the connection”Open /mcp or run codex mcp list, then save and retrieve a test note across clients. Ordinary search reads saved notes; search_history reads uploaded sessions. Eligible new notes may be processed by the MMW AI Archivist through an external model provider; gateway and experimental dispatch remain disabled. Project and access permissions still apply.
For401, check the local environment and credential validity without printing the value. For a local-agent timeout, check uv/Python rather than disabling authorization.