Codex CLI Setup

Configure MemPad with OpenAI's Codex CLI for persistent AI memory.

Prerequisites

Installation

Codex requires an experimental flag for HTTP MCP servers with OAuth. Add this to your config:

# Create or edit ~/.codex/config.toml

# Enable experimental HTTP MCP support (required)
experimental_use_rmcp_client = true

[mcp_servers.mempad]
type = "http"
url = "https://api.mempad.ai/mcp"
Important: The experimental_use_rmcp_client = true line must be at the top level of the config file, not nested under any section.

Authentication

After configuring, authenticate with MemPad:

codex mcp login mempad

This will open your browser to complete the OAuth flow. Sign in with your MemPad email and password.

Usage

Once authenticated, use these commands with Codex:

mp!

Load your memory into the conversation

mp:

Save the current context to your memory

Example Session

You: mp!
Codex: Memory loaded. You prefer Go with standard library over
frameworks, you're building a CLI tool, and you like minimal comments.

You: Update: I'm now also using Cobra for CLI structure
Codex: Noted! I've added Cobra to your preferences. mp:

Memory updated.

Troubleshooting

Experimental Flag Not Working

Make sure the experimental flag is at the top level:

# Correct:
experimental_use_rmcp_client = true

[mcp_servers.mempad]
...

# Incorrect (will not work):
[experimental]
use_rmcp_client = true

Re-authenticate

If authentication expires or fails:

codex mcp logout mempad
codex mcp login mempad

Next Steps