Skip to content
MMW Docs

Connect Codex directly to MMW without a local agent. Use the optional local route below only for stdio or separately consented history sync.

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:

Terminal window
read -rsp 'MMW API key: ' MMW_API_KEY; echo
export MMW_API_KEY
codex

For PowerShell:

Terminal window
$secret = Read-Host 'MMW API key' -AsSecureString
$env:MMW_API_KEY = [System.Net.NetworkCredential]::new('', $secret).Password
codex
Remove-Item Env:MMW_API_KEY

Alternatively 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.

For stdio or consented session sync, use Python 3.11+ and uv:

Terminal window
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 setup

Setup prompts for the key locally. A person must separately approve history uploads; shared notes do not require that consent. Session history.

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.