RelayOrb

Codex MCP: add servers in config.toml and record every tool call

Updated

The OpenAI Codex CLI can use MCP servers as tools. Servers are configured in ~/.codex/config.toml. Here's the format, plus how to record what Codex sends to each server.

Configure an MCP server for Codex

Add an [mcp_servers.<name>] table with the command and its arguments. Codex starts the server over stdio.

~/.codex/config.toml

[mcp_servers.fs]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]

Record Codex's tool calls

Make relayorb the command and put the original server after --. Every request and response is saved to ~/.relayorb/recordings.db.

~/.codex/config.toml with RelayOrb

[mcp_servers.fs]
command = "relayorb"
args = ["record", "--name", "codex-fs", "--", "npx", "-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]

Inspect, replay, and test

relayorb show codex-fs prints every call with timing and outcome. relayorb replay serves the recorded answers so you can rerun a Codex task against the exact same tool results, and relayorb check turns the recording into a regression test for the server.

Terminal

relayorb show codex-fs
relayorb export codex-fs -o fixtures/codex-fs.json

Install RelayOrb

Free and open source (Apache-2.0). A single binary for macOS, Linux, and Windows. No account, no cloud, no telemetry.

macOS / Linux

curl -fsSL https://relayorb.com/install.sh | sh

Windows and other options: GitHub Releases.

FAQ

Where do I configure MCP servers for Codex?
In ~/.codex/config.toml, using one [mcp_servers.<name>] table per server with command and args.
How do I see what Codex sent to an MCP server?
Wrap the server with relayorb record -- in config.toml, then run relayorb show <name> after the task.