Integrations

Codex

Run the OpenAI Codex CLI on Memtro over the Responses API, or add Memtro's tools to it.

Open Memtro

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.

  1. Create a personal API key on Dashboard → Profile → API keys — it acts as you, with your memory, connections and permissions.
  2. Put the key in your environment:
export MEMTRO_API_KEY=sk-memtro-...
  1. 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.

model_reasoning_effort is carried across, so --config model_reasoning_effort=high asks for more thinking here as it would against OpenAI.

One tool does not cross over. Codex's freeform apply_patch is a Responses custom tool: the model calls it by emitting raw text rather than JSON matching a schema, and there is no honest way to offer that as a function tool, so it is left out of what the model is told it has. Codex's other tools — the ones it declares as functions, and the ones it runs itself — are unaffected. If a turn depends on it, Codex falls back to editing through the tools it does have; if you would rather it never reach for the freeform one, turn it off in your Codex config.

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 auto not 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.

store and previous_response_id are 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.

Where agents remember your company

Sign in, add a provider key, create an API key and point your tools at Memtro. It takes about five minutes.

7-day free trial · card on file, nothing charged until it ends · cancel any time