Replyz / Codex

How to add an MCP server to Codex, and give Codex its own inbox.

Codex connects to MCP servers through config.toml. This page shows how to add a remote server with an API key kept in an environment variable, using the Replyz MCP server as the example. With it, Codex gets an email inbox of its own.

Get early access The Replyz MCP server

How do you add an MCP server to Codex?

Codex keeps MCP servers in ~/.codex/config.toml (or .codex/config.toml in a trusted project). Each server is a [mcp_servers.<name>] table. The CLI, the IDE extension and the desktop app all read the same file.

A remote server with an API key

[mcp_servers.replyz]
url = "https://mcp.replyz.io/mcp"
bearer_token_env_var = "REPLYZ_API_KEY"

bearer_token_env_var takes the name of an environment variable, not the key. Codex reads the variable and sends Authorization: Bearer …, so the key never sits in the file. Set it in your shell profile:

export REPLYZ_API_KEY="…"

Other ways to add a server

How do you check it worked?

codex mcp list

Or type /mcp in the Codex terminal UI or the desktop app.

What can Codex do with its own inbox?

Test sign-up flows

Register a test user on your app with a fresh address and check the verification email arrives.

Check reset links

Trigger a password reset, wait for the email and confirm the link works.

Read codes and links

get_verification returns the code or link from the right email, even if it came first.

Sign up for dev services

Create accounts for the APIs a project needs without your personal address.

What can you ask Codex?

"Create a Replyz inbox and sign up a test user on the staging app."
"Wait for the verification email and check the link returns 200."
"Read the welcome email we send and compare it with the template."

Which tools does Codex get?

create_inbox, list_inboxes, wait_for_email, get_verification, list_messages, read_message, email_my_human and account_status. Details on the MCP server page.

Frequently asked questions

How do I add an MCP server to Codex?

Add a [mcp_servers.<name>] table to ~/.codex/config.toml with the server's url, or run codex mcp add <name> --url <url>. For local servers, use codex mcp add <name> -- <command>.

How do I pass an API key to a remote MCP server in Codex?

Set bearer_token_env_var in the server's config.toml table to the name of an environment variable. Codex reads the token from that variable and sends it as an Authorization bearer header.

Where is the Codex MCP config file?

~/.codex/config.toml for all projects, or .codex/config.toml inside a trusted project. The CLI, the IDE extension and the desktop app share it.

How do I check which MCP servers Codex is using?

Run codex mcp list, or type /mcp in the Codex terminal UI or the desktop app composer.

Can Codex have its own email address?

Yes. Add the Replyz MCP server and Codex can create inboxes, wait for email and read verification codes, for example while testing your app's sign-up flow.

Give your agent an inbox.

Replyz is in private early access. Tell us which agent you run.

Get early access