Agent Connect

Connect Your Agent

Connect Codex

Add Agent Connect to Codex with two commands and sign in through your browser.

On This Page

Model Context Protocol (MCP) lets Codex use Agent Connect tools. You sign in through your browser. No key is pasted into Codex.

Add the Server

Copy the MCP URL from Connect your agent, the setup wizard’s last step, or the dashboard’s Connect MCP Client page, choose Codex, then CLI or Desktop app. The Codex CLI, desktop app and IDE extension share ~/.codex/config.toml, so adding the server once covers all three.

Codex CLI

Run this in a terminal:

codex mcp add agent-connect --url <URL>

Replace <URL> with the MCP URL shown in Agent Connect, for example https://<your-agent-connect-host>/mcp. Codex detects the sign-in and opens your browser. If it does not, run codex mcp login agent-connect. Restart Codex if it was already open.

Codex Desktop App

  1. Copy the prompt from the Desktop app tab and paste it into a Codex chat. It asks Codex to add the [mcp_servers.agent-connect] table to ~/.codex/config.toml. Approve the write when Codex asks.
  2. Restart Codex.
  3. Open Settings → MCP plugins and choose Authenticate next to agent-connect.

To add it by hand instead, expand Manual setup in the Desktop app setup instructions and copy the MCP server URL. Open Settings → MCP plugins → Add server, choose Streamable HTTP, name it agent-connect and paste that URL.

Sign In

  1. Your browser opens. Sign in to Agent Connect and choose which agent Codex should use, or create one there.
  2. Select the accounts it can use and complete the signature request for each one with the wallet or passkey you signed in with.

Agent Connect shows Waiting for your agent to sign in… and then Connected with the client’s name.

Test Before Spending

Ask Codex:

What are my Agent Connect balances?

It should list your accounts and their balances. A zero balance is still a successful check.

Use an API Key Instead

For a headless Codex, such as one running on a server, choose Use an API key instead on the dashboard’s Connect MCP Client page. You complete one signature request per account, and the key lasts 30 days. It is shown once.

Set the key in the environment that starts Codex:

export AGENT_CONNECT_KEY=...

Then reference the variable in ~/.codex/config.toml:

[mcp_servers.agent-connect]
url = "<URL>"
bearer_token_env_var = "AGENT_CONNECT_KEY"

Never paste the key into a prompt or commit it to a repository.

Disconnect

Choose Disconnect in the dashboard to revoke Codex’s access. For each account, you sign the grant revocation. See Troubleshooting if tools are missing or sign-in fails.

MCP Tools