Setup guide

Connecting OmniMem to OpenAI Codex CLI

Codex CLI is OpenAI's open source coding agent for the terminal. It's configured in TOML and speaks Streamable HTTP natively, which is exactly what OmniMem 7 serves, so it's a two-line job.

Quick setup

Create or edit ~/.codex/config.toml:

[mcp_servers.omnimem]
url = "http://127.0.0.1:8765/mcp"

On the desktop app, Copy MCP URL in the tray or menu bar menu puts that address on your clipboard.

If OmniMem has an access token set (MCP_AUTH_TOKEN, or Access token on the Configuration page):

[mcp_servers.omnimem]
url = "http://127.0.0.1:8765/mcp"
bearer_token_env_var = "OMNIMEM_TOKEN"

Then set the token in your shell: export OMNIMEM_TOKEN=your-token-here

Note that bearer_token_env_var takes the name of the variable, not the token itself. I've tripped over that one.

Config file locations

File Scope Use when
~/.codex/config.toml All projects OmniMem should be available everywhere (recommended)
.codex/config.toml (project root) Single project Only this project needs OmniMem (requires project trust)

Known quirks

Verifying the connection

Start a Codex session and ask:

Call the OmniMem health tool to check the connection

You should get back the record and vector counts per namespace, whether the embedding model is loaded, and the uptime.

Notes

By Ric HarveyUpdated All guidesThis guide on Forgejo