Codex
Codex is OpenAI’s coding agent. It supports The Librarian’s standard protocol (MCP) directly, so connecting it is one configuration block — no plugin, no code.
When you’d use this: you work in Codex and want shared memory and handoffs alongside your other tools.
Before you start: you need a running Librarian server, its MCP URL, and an agent token — see Install.
The easy way
Section titled “The easy way”npx @the-librarian/cli install # choose Codex; paste your MCP URL + tokennpx @the-librarian/cli update # later: refresh the integrationThis writes the configuration block for you and installs the automatic-capture hooks. Capture needs one extra opt-in: see Automatic capture below.
The manual way
Section titled “The manual way”Add this to ~/.codex/config.toml:
[mcp_servers.librarian]url = "https://librarian.example.com/mcp"bearer_token_env_var = "LIBRARIAN_AGENT_TOKEN"The token is referenced by name here, never written as a value — Codex sends it only in the request header. Set it in your shell profile and restart Codex:
export LIBRARIAN_AGENT_TOKEN="<your-token>"The /mcp panel should now list librarian with seven tools.
What you get
Section titled “What you get”- Seven memory and handoff tools — recall, remember, flag, store/list/claim handoffs, and search references.
- The primer — Codex presents The Librarian’s briefing as guidance alongside the tools, so the recall/remember loop and the handoff protocol ride into every session with no setup.
- Plain-language control — Codex has no slash commands, so you simply say what you want: “hand this off”, “pick up where I left off”, “save what we learned”, “go private”. The agent maps each to the right action.
Automatic capture
Section titled “Automatic capture”Codex can capture your conversation automatically, the same way Claude Code does.
The installer wires the hooks, but Codex will not fire them until you turn the
feature on — add this to ~/.codex/config.toml and restart Codex:
[features]codex_hooks = trueCapture is on by default once enabled, skips private mode,
and can be switched off per machine with LIBRARIAN_AUTO_SAVE=false.
Check it worked
Section titled “Check it worked”Open Codex’s /mcp panel; a healthy Librarian lists exactly seven tools. If
it does not appear, confirm LIBRARIAN_AGENT_TOKEN is set in the shell that
launched Codex.
Full technical reference
Section titled “Full technical reference”For the complete configuration reference and capture details, see the Codex integration README.