How to use my Codex 5.3 Azure API to code in Replit?

How to use my Codex 5.3 Azure API to code in Replit UI? I want my complicated code to be writren by top models like codex 5.3 which I pay separately, not by outdated garbage which Replit uses just burning my miney and time. I can’t submit my project to Buildathon, because Replit writes garbage. Can anyone help or advice. Thanks

If you describe specific issues you’re facing, perhaps someone can offer some advice.

Also, Replit uses Opus 4.6 for tough jobs. It also uses Gemini for design mode (and other things, I suspect). It certainly doesn’t write garbage. We build complex applications all day, every day, with Replit.

you can use codex in VScode, use MCP Servers and GitHub to connect to replit, then you can use the preview to test and publish like normal, i use Claude directly since I wasn’t a fan of Agent 4 with my older project. I will send you a breakdown of how i set it up my workflow, codex or claude have the same setup you just need the api key or to use the codex connector

That’s Great! Can you send me these instructions? It would be super helpful.

The question is - It’s there a way to connect Codex in Replit settings somehow as before to use my own API keys?

Hi. How can you send me this? Please send to drookpa@gmail.com

Buildathon warning first: Per the rules, other AI tools are allowed but the majority of your project must be built with the Replit Agent and this is verified weekly. So this workflow might disqualify you from the grand prizes if Codex is doing most of the heavy lifting. Definitely worth reading the full rules at buildathons.replit.app before going this route. After the Buildathon though, this is 100% the move.


The setup — VS Code + Codex + Replit via SSH:

  1. Install the Codex VS Code extension from the marketplace and sign in with your OpenAI/Azure account

  2. Clone your Replit repo locally via git

  3. Add your Replit environment as an SSH connection — this is the key part. It lets Codex run commands directly inside your Replit shell: install packages, restart services, check logs, run scripts. Everything Replit’s Agent does, but powered by your own Codex model on your own billing

  4. Write and iterate in VS Code with Codex, push changes via git

You only need SSH MCP servers when you need Codex to reach out and actually execute things on a remote system. For a standard Replit setup, just adding Replit via SSH is all you need — no other MCP servers required unless you’re connecting to external databases or separate infrastructure.

In ~/.codex/config.toml:

toml

[mcp_servers.replit]
command = "ssh"
args = ["-i", "~/.ssh/your-replit-key", "user@your-replit-ssh-host"]

Or purely terminal-based:

bash

npm install -g @openai/codex

export OPENAI_API_KEY=your-azure-key
export OPENAI_BASE_URL=https://your-resource.openai.azure.com/openai/deployments/your-deployment

codex "fix this function and handle edge cases"

Same SSH setup applies — Codex can then reach into Replit to run and verify things directly.

Bottom line: Replit becomes your host, Codex is your coding engine, SSH is the bridge. You get the Agent experience without the Agent fees. Just hold off on making it your primary workflow until after the Buildathon judging if prizes matter to you.

1 Like

Good point, thanks for these instructions and hints.