Skip to content
Connect an agent
DocumentationConnect an agent
Codex

Connect Codex

Connect Codex to the details you’ve already saved in Maury, so you can pick up where you left off.

Before you start

Install the Codex CLI and have your own Maury OAuth access token ready. See Authentication for the registration prerequisite and token flow.

Make your token available locally

Set MAURY_MCP_ACCESS_TOKEN in your shell environment or local secret manager to the access token from your registered Maury connection. Start Codex from that environment. Use a token with memories:read to begin.

The token value stays outside the config file. Don’t commit it to your project.

Add Maury to Codex

Run this command in your terminal:

Terminal
codex mcp add maury \
  --url https://app.maury.ai/mcp \
  --bearer-token-env-var MAURY_MCP_ACCESS_TOKEN

Or add the equivalent configuration to ~/.codex/config.toml:

~/.codex/config.toml
[mcp_servers.maury]
url = "https://app.maury.ai/mcp"
bearer_token_env_var = "MAURY_MCP_ACCESS_TOKEN"

Choose one method; both configure the same server.

Check the connection

Terminal
codex mcp list

Start a new Codex session. Use /mcp to check the connected server, then try a read-only prompt:

Search Maury for my project notes and summarize the relevant memories.

Choose a topic you’ve saved in Maury. No search results can simply mean there isn’t a matching indexed memory.

Save something for later

To record new text memories, authorize both memories:read and memories:write in your Maury connection, then provide the new token to Codex.

Save this in Maury: I prefer a short written summary before planning meetings.

Maury saves new text in your default brain. Reconnecting with a read-only token keeps saving unavailable.

Correct a saved detail

To update existing memories, authorize memories:read and memories:edit, provide the new token, and restart Codex. Recording permission alone cannot edit.

Correct my Maury memory about the project review: it is on Friday. Update the original memory and preserve the other details.

The agent fetches the full text and revision, then replaces the text using update_memory. If another edit intervened, it must fetch again and review the correction. See how corrections work.

Official Codex MCP reference