Corey in Codex
To use Corey in Codex, add an mcp_servers.corey block to ~/.codex/config.toml with the Corey URL, then run codex mcp login corey to sign in through your browser. Codex treats a server with a url as a remote streamable-HTTP server and defaults its auth to OAuth, so there is no token to paste. Then open the folder you want Corey to work in and run the kickoff prompt.
Codex is OpenAI’s coding agent. You can run Corey inside it by adding Corey as a remote MCP server. If you prefer a chat app, use the Claude Desktop guide; if you want Corey running unattended, use the Cursor guide.
How this works: a URL and one command, no token
Corey is a remote MCP server served over HTTPS. Codex supports remote MCP servers natively and defaults their authentication to OAuth, so all you do is give Codex the URL and run one login command. Codex opens your browser, you sign in to Corey, and Codex stores and refreshes the tokens for you. There is no access token to paste.
Corey is the same operator here as it is in Claude. It was built by Claude, on Claude, and Claude is still the reference client - but the connection is a standard one, so nothing about your memory, tools or approvals changes when you run it in Codex.
Step 1: Add Corey to your Codex config
Codex reads its configuration from ~/.codex/config.toml. Add an mcp_servers.corey block with a single url key:
[mcp_servers.corey]
url = "https://mcp.getcorey.ai/mcp"That is the whole entry. Codex treats any server with a url as a remote streamable-HTTP server, and its auth setting already defaults to oauth, so you do not need to set it.
Note that codex mcp add is for local stdio servers, which Codex launches as a subprocess. Corey is reached over HTTPS, so it goes in the config file rather than through that command.
Step 2: Sign in with codex mcp login
Run the login command for the server you just added:
codex mcp login corey- Your browser opens Corey’s sign-in page (powered by WorkOS), not Codex asking for a password.
- First time: create your Corey account. This starts your 28-day probation at no cost, no card. Returning: sign in.
- Return to your terminal. Codex now holds the session and Corey’s tools are available to the agent.
Because the tokens live with Codex and never touch your config file, that file is safe to commit.
Step 3: Open the folder Corey should work in
Start Codex in the folder you want Corey to manage, or default to ~/Corey. Corey reads and writes files in that folder through Codex. Setup is non-destructive: Corey only adds files that are missing and never deletes anything, so pointing it at an existing folder is safe.
Step 4: Run the kickoff prompt
Paste this as your first message:
You are Corey. I've just connected you.
1. Run whoami to confirm the connection. If it fails, stop and tell me what to fix.
2. Run the onboard tool and walk me through the Meet Corey interview, one question at a time.
3. Write my setup into this folder as my overlay.
4. Then show me three things you can do for me right now.Corey confirms the connection, runs the onboarding interview, sets up your workspace in the open folder, and suggests three concrete things it can do for you right now, drawn from what you told it in the interview.
Still not connecting?
- Corey does not appear at all: confirm the block is
[mcp_servers.corey]and that the URL ishttps://mcp.getcorey.ai/mcp(HTTPS, ends in/mcp). - The browser did not open: run
codex mcp login coreyagain and open the authorization URL it prints manually. - You copied the entry from Claude Code or Cursor: those use JSON, not TOML. Take only the URL and write it in the TOML shape above.
- Tools are missing after signing in: restart Codex so it re-reads the config and picks up the authenticated session.