This guide connects Perfect Memory to the OpenAI Codex CLI over MCP, so you can ask Codex about your screen history and meetings right from your terminal. It uses the same connector URL as every other client. New to MCP? Start with how it works.
Sign in at perfectmemory.ai/account, find the Connect AI assistants (MCP) card, and click Generate token. Copy the connector URL it gives you — the token is shown only once:
https://www.perfectmemory.ai/api/mcp/u/<your-token>Treat this URL like a password. You can rotate or revoke it anytime from the same page.
Make sure you have the Codex CLI installed and up to date (remote, streamable-HTTP MCP servers need a recent version). Then run:
codex mcp add perfect-memory --url https://www.perfectmemory.ai/api/mcp/u/<your-token>Codex confirms with Added global MCP server 'perfect-memory'. The token rides inside the URL, so no separate authentication flag is needed.
Prefer editing config by hand? Add this to ~/.codex/config.toml instead:
[mcp_servers.perfect-memory]
url = "https://www.perfectmemory.ai/api/mcp/u/<your-token>"To confirm it registered, run codex mcp list, or type /mcp inside a Codex session.
On the PC running Perfect Memory, open Settings → Advanced and turn on “Enable MCP server”. On your account page, the status pill turns green (App connected) once the app is online. Searches only work while the app is running.

In a Codex session, try “Search my screen history for the API key I copied earlier” or “What were the action items from my last meeting?” Codex will call Perfect Memory and answer from your own data.
--url flag — your Codex CLI is too old for remote MCP servers. Update it, or use the config.toml snippet above.codex mcp add with the new URL.