Codex
Run the OpenAI Codex CLI on Memtro over the Responses API, or add Memtro's tools to it.
The OpenAI Codex CLI can talk to Memtro in two ways: as the model behind every turn, so Codex works with your organisation's memory and connectors, and as an MCP server, so it keeps its own model and gains Memtro's tools.
Memtro as Codex's model
Codex speaks the Responses API to a custom provider, and nothing else. Memtro serves it at /v1/responses alongside the chat-completions endpoint the other clients use.
- Create a personal API key on Dashboard → Profile → API keys — it acts as you, with your memory, connections and permissions.
- Put the key in your environment:
export MEMTRO_API_KEY=sk-memtro-...
- Add this to
~/.codex/config.toml:
model = "auto"
model_provider = "memtro"
[model_providers.memtro]
name = "Memtro"
base_url = "https://platform.memtro.com/v1"
env_key = "MEMTRO_API_KEY"
wire_api = "responses"
Then run codex as usual. Every turn is routed by difficulty, answered with your memory in front of it, and what it learns is written back. Codex's own tools keep working because Codex executes them; Memtro's connector and memory tools are offered alongside them and run on the server.
Use any model id in place of auto: memtro for the organisation default, anthropic/claude-opus-5, openrouter/z-ai/glm-5.3, or auto:agent to make every turn a multi-step investigation.
Codex prints Model metadata for
autonot found on the first turn. That is Codex noting it has no built-in token limits for a model id it does not recognise, which is every Memtro id. It is harmless.
storeandprevious_response_idare accepted and ignored. Memtro keeps no conversation state against a response id, and Codex sends the whole input each turn, so nothing is lost.
Memtro's tools inside Codex (MCP)
Keep whatever model Codex is already using and add Memtro's tools to it:
codex mcp add memtro --url https://platform.memtro.com/api/mcp \
--bearer-token-env-var MEMTRO_API_KEY
That writes an [mcp_servers.memtro] block to ~/.codex/config.toml. Add one more line to it:
[mcp_servers.memtro]
url = "https://platform.memtro.com/api/mcp"
bearer_token_env_var = "MEMTRO_API_KEY"
default_tools_approval_mode = "approve"
The last line matters. Without it Codex decides each tool needs a human to confirm it, finds no one to ask, and refuses every call with MCP tool call requires approval. Approving them here is safe: your per-tool grants on the Permissions page already decide what Memtro will actually run.
Then ask Codex things like search memtro for what we decided about retries or remember that BigCo renewed for £40k.
Memtro running on your ChatGPT plan
The reverse also works. Under Providers add a Codex key: either an OpenAI API key, or the contents of ~/.codex/auth.json from a machine where you have run codex login. Memtro then answers codex/* models on your ChatGPT subscription, running the CLI in a one-shot sandboxed container per request.
Codex also has an integration page summarising the three fits.