docs(codex): fix broken install instructions, lead with direct MCP

The support ticket that surfaced this found three overlapping issues:

1. docs/integrations/codex.mdx shipped a marketplace.json snippet with
   path "./plugins/mem0" — a directory that does not exist, with no clone
   prerequisite documented, and using a folder name that does not match
   the actual mem0-plugin/ directory. Users copy-pasted it verbatim and
   hit "plugin/read failed in TUI".

2. The "Manual MCP Configuration" option used a JSON mcpServers block.
   Codex reads MCP servers as TOML in ~/.codex/config.toml, not JSON.
   Same bug in docs/platform/mem0-mcp.mdx (no Codex accordion at all on
   main) and mem0-plugin/README.md Option C.

3. The page claimed "Codex uses a skill-based approach instead of
   lifecycle hooks" — stale; hooks are now available via opt-in
   installer (mem0-plugin/scripts/install_codex_hooks.py).

Lead with the working TOML MCP config (zero dependencies, works today),
demote the marketplace.json to a "Sideload (Advanced)" section with the
required git clone step and the correct mem0-plugin path, and point
sideloaders at the hooks installer + codex_hooks feature flag. Added
troubleshooting entries for the TUI read error and hooks-not-firing.
This commit is contained in:
gabrielstein-mem0
2026-04-23 15:04:35 -07:00
parent 43dde3b186
commit 43b222ca57
3 changed files with 69 additions and 68 deletions
+7 -15
View File
@@ -86,25 +86,17 @@ Add to `~/.agents/plugins/marketplace.json`:
}
```
**Option C — Manual MCP configuration**:
**Option C — Direct MCP configuration** (fastest, MCP-only):
Add to your Codex MCP config:
Codex reads MCP servers from `~/.codex/config.toml` as TOML. Add:
```json
{
"mcpServers": {
"mem0": {
"type": "http",
"url": "https://mcp.mem0.ai/mcp/",
"headers": {
"Authorization": "Token ${MEM0_API_KEY}"
}
}
}
}
```toml
[mcp_servers.mem0]
url = "https://mcp.mem0.ai/mcp"
bearer_token_env_var = "MEM0_API_KEY"
```
This installs the MCP server and the Mem0 SDK skill. Codex uses the skill-based memory protocol instead of lifecycle hooks.
Export `MEM0_API_KEY` in your shell and restart Codex. This gives you the MCP tools without the plugin skills or lifecycle hooks. `codex mcp add` only supports stdio servers, so HTTP servers like Mem0's must be added via `config.toml` directly (or via the **Plugins → Connect to a custom MCP → Streamable HTTP** UI in the Codex app).
### Cursor