Connect Codex
You can connect a Genesis project to OpenAI Codex on your computer and let it build that project: edit pages, generate images, add a backend, publish. The connection covers one project, you approve it in your browser, and you can revoke it at any time. Codex runs on your own subscription, so building doesn’t spend your ESTAGE credits. A few tools that call paid AI services still do — see Tools that use credits.
Codex uses the same Genesis server, the same tools and the same safety checks as Claude. Only the setup differs. To work from ChatGPT in the browser instead, with nothing installed, see Connect ChatGPT.
Connecting a project
Section titled “Connecting a project”Everything starts in Account → Integrations → Coding agents:
- Pick the project from the Project dropdown.
- Open the Codex tab. It gives you two commands, already filled in with your project ID:
codex mcp add genesis-73891 --url https://genesis.estage.com/api/agent/73891/mcpcodex mcp login genesis-73891- Run the first command. It registers the project as an MCP server called
genesis-73891. Keep the project ID in the name, so several projects stay apart. - Run the second command. It opens your browser: sign in to Genesis and select Allow access on the consent screen. Codex stores the result itself; nothing is pasted into a config file.
Check it landed with codex mcp list. To sign out again: codex mcp logout genesis-73891.
Inside the builder, the header’s ⋯ menu has Connect an agent for the project you have open, with the same commands ready to copy.
Repeat both commands per project, each with its own name and URL.
A project with several apps (a website and a Web app, for example) needs one connection per app.
Pick the app under App before you copy the commands; the server name and the URL then carry
the app, for example genesis-79035-jenesis-os and …/api/agent/79035/mcp?surface=jenesis-os.
See A project with several apps.
No browser? A scoped token instead
Section titled “No browser? A scoped token instead”- On the Codex tab, under Or: a scoped token, optionally give it a Label and select Generate token. The token is shown once — copy it right away.
- Append this block to
~/.codex/config.toml(create the file if it isn’t there):
[mcp_servers.genesis-73891]url = "https://genesis.estage.com/api/agent/73891/mcp"bearer_token_env_var = "GENESIS_AGENT_TOKEN"startup_timeout_sec = 30tool_timeout_sec = 300- The token stays out of the file — Codex reads it from an environment variable. Export it in
the shell you start
codexfrom (add the line to your~/.zshrc/~/.bashrcto make it stick):
export GENESIS_AGENT_TOKEN=YOUR_ONE_TIME_TOKENcodex mcp listcodex mcp list should show genesis-73891. One block per project — repeat it with the next
project’s ID and its own token. Manage or Revoke tokens in the Active tokens list on the
same screen.
First message of every new session
Section titled “First message of every new session”Codex can be tempted to work on local files on its own, so start a new chat by pointing it at the connection. The builder’s ⋯ → Connect an agent gives you a first-message line, prefilled with your project ID (the Codex tab shows it too, once you generate a token). Send it as the first message of each new session.
Codex in the cloud
Section titled “Codex in the cloud”Codex tasks that run in the cloud at chatgpt.com/codex don’t use this setup. Whether those tasks can use a custom connector is up to OpenAI. ChatGPT chats in the browser can — see Connect ChatGPT.
Things worth knowing
Section titled “Things worth knowing”- What Codex can do in the project is the same list as for Claude — see What your agent can do in your project.
- Say which project you mean when several are connected — see Working across several connected projects.
- Share selection in the builder works for Codex too — see Point the agent at what you’re looking at.
- Disconnecting and the safety rules are on Connect Claude.
Related: Connect Claude · Connect ChatGPT