How to make games in Codex: the Codex CLI, the ChatGPT app, or your ChatGPT plan inside Flockbay
By Eduardo Orellana · Updated
Flockbay is free on your own Claude or ChatGPT plan. Claude Pro or Max, or ChatGPT Plus or higher, builds a real Godot project in the Godot editor. Claude Free and ChatGPT Free do not run here. More models are optional, a credit reload at API prices. Codex makes games when it can run them: connect it to Flockbay with one codex mcp add line, and Codex puts together a Godot 4 game in the editor Flockbay hosts, runs it, reads its errors and playtests it. If you would rather not run Codex yourself, sign in with ChatGPT inside Flockbay instead, which needs ChatGPT Plus or higher. Neither costs anything beyond the ChatGPT plan you already have.
TL;DR. As of 29 Sep 2026, on Windows. Codex: install the CLI, sign in with ChatGPT, then in Flockbay open Connectors, Another agent (MCP), Set up, Turn on, Codex, Copy, and paste the line into PowerShell; /mcp in Codex lists flockbay-stage. No Codex: Connectors, ChatGPT, Sign in with ChatGPT, on Plus, Pro, Business, Enterprise or Edu.
How to make games in Codex, and why it stalls without a game engine
Codex is careful by design. It plans, works inside a sandbox, and asks before it does anything it is unsure of. Ask it for a coin that spins and disappears when the player touches it, and you get a clean script and a tidy explanation. What you do not get is the moment where Codex watches the player walk into the coin. It never ran the game, because nothing it had could.
Flockbay is the missing half. It is a free AI game maker built on Godot: a desktop app with the official Godot 4.7.2 inside, not a fork, where your game is a real Godot 4 project you can open, read and change, and the builder lives inside the Godot editor. Over MCP it hands Codex the running game: Codex playtests it, reads the errors, captures the viewport and fixes what broke before it reports back.
There are two ways to put OpenAI's models to work on a game in Flockbay, and they are different products. You can run Codex yourself and connect it, or you can sign in with ChatGPT inside Flockbay and let the app's own AI build on your subscription. This page covers both, with the troubleshooting specific to Codex. For Claude, the same walk is how to make games in Claude Code.
What you need for Codex and Flockbay
Windows 11 on a 64-bit Intel or AMD PC, which is where Flockbay runs for now; a Mac release follows. A connection to the internet for as long as you are building, and a Flockbay account, which is free.
Codex, in one of the three places OpenAI ships it: the Codex CLI, the IDE extension, or the ChatGPT desktop app, where you choose Codex. The CLI runs natively on Windows; install it from PowerShell with the line below, or with npm install -g @openai/codex. The first time you run codex, choose Sign in with ChatGPT.
A ChatGPT plan that includes Codex in the CLI: Plus at $20 a month or higher, as of 29 Sep 2026. An OpenAI API key works too, billed at API rates: codex login --with-api-key reads it from standard input. OpenAI lists Free and Go as getting Codex in its desktop app only, subject to rollout; we have not tried Flockbay there.
More on this: Flockbay vs Summer Engine: official Godot, or an engine built on it
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"Step 1: connect Codex to Flockbay with codex mcp add
Install Flockbay from flockbay.com, open it, describe your game in a sentence, sign in when it asks and press Continue. Your game opens in the Godot editor that the Flockbay app hosts. Leave it there: Codex can only reach the game the app has open.
In the Flockbay menu choose Connectors, then Set up beside Another agent (MCP). Switch it on with Turn on, choose Codex from the list, and Copy. Run the copied line in PowerShell or Command Prompt. It registers a single server, flockbay-stage, in Codex's global config, so Codex sees it from any folder.
Press Install skills in the same place. It copies Flockbay's instructions for your agent into Codex's skills, so Codex knows how the tools fit together before it starts. Codex gets skills only; the hooks the app installs are for Claude Code and Cursor.
The Flockbay app writes this for you with the real paths filled in: open the account menu, choose MCP connection, press Turn on, pick Codex and press Copy. The three paths are specific to your machine and stay the same from one sitting to the next, so you paste it once. Below is the shape, with the paths as placeholders.
More on this: Prompt templates for your own agent in Flockbay
codex mcp add flockbay-stage --env "FLOCKBAY_LOCAL_STAGE_CAPABILITY_AUTHORITY_DESCRIPTOR=<descriptor>" -- "<node>" "<coordinator>" --external-stage-mcpCodex keeps the Flockbay server in config.toml
Codex keeps its servers in config.toml, in its home folder: %USERPROFILE%\.codex\config.toml on Windows. The CLI, the IDE extension and the ChatGPT desktop app share that configuration, so according to OpenAI's docs a server added once reaches all three.
The entry is worth knowing for when something goes wrong. Below it is written by hand, with the paths as placeholders and one optional line added. In TOML, put Windows paths in single quotes, or double every backslash. Two optional settings matter here. startup_timeout_sec is how long Codex waits for the server to start, 10 seconds by default. default_tools_approval_mode decides whether Codex asks before this server's tools run: auto, prompt, writes or approve.
More on this: Making games with Kilo Code and Flockbay
[mcp_servers.flockbay-stage]
command = '<node>'
args = ['<coordinator>', '--external-stage-mcp']
startup_timeout_sec = 20
[mcp_servers.flockbay-stage.env]
FLOCKBAY_LOCAL_STAGE_CAPABILITY_AUTHORITY_DESCRIPTOR = '<descriptor>'Step 2: start Codex in the game's folder and check /mcp
Open a terminal in your game's folder, usually Documents\Flockbay and the game's name, and type codex. Inside Codex, /mcp lists the servers it started; flockbay-stage should be there. /mcp verbose adds each server's diagnostics.
Codex reads AGENTS.md before it does any work. Flockbay's instructions reach it through the tools and the skills, so AGENTS.md is for your own preferences: the feel you are after, what not to change, how you like changes reported.
Codex suggests its permissions from the folder. For a folder under git it recommends Auto, which edits inside the folder and asks before touching anything outside it or the network; for a folder without git it recommends read-only. Run git init in the game's folder before your first session. It gives Codex the right default and gives you a history to undo a bad afternoon with.
Step 3: prompts that give Codex something to check
Codex is at its best with a task that has a finish line. "Make the game fun" has none. "Add a coin that spins, and disappears with a sound when the player touches it. Then play the game, walk the player into the coin, and tell me whether it left the scene" has one, and Codex can reach it on its own.
Open with a reading task so it learns the project first: ask what is in the main scene, how the player moves and what the controls are. Then one mechanic per prompt, each with a number or an event to check. Codex tends to show its plan before it acts; read it, because that is the cheapest place to catch a misunderstanding.
What Codex does with Flockbay's tools
It changes the game through the open Godot editor. Nodes, properties, scripts, resources and signals are changed there, each change a single step in Godot's undo history, and the scene is saved after it. A bad step is one Ctrl+Z in the editor.
It proves the change. It gets Godot's own parse error, with the line, for a script it writes, and can do a headless run to see it start. Then it plays the game in the app's Game screen and reads stdout, every error with its file, line and call stack.
It tries the game the way a player would. Codex can hold a key for half a second, click, move the mouse or fire an input action, then read a value off the running scene, such as whether the coin node still exists, and capture the game viewport or the editor's 3D or 2D viewport. None of that moves your own mouse, and if you touch a key while it is playing, it stops and hands the game back.
The world is not hand-written geometry. Ground, water, sky, weather, the player and every placed object come from systems Codex asks for by name and settings: six of them in a 3D game, four in a 2D one, which has no water or weather. For props it can search Flockbay's library of models, textures and sounds, or generate new ones if you have added a Tripo or ElevenLabs key.
Codex may ask before it calls a tool that changes the game, depending on your permissions and the server's approval setting. Approving is cheap here, because every editor change is one Ctrl+Z. Its steps also show in the Flockbay app, in a chat named Your agent.
The other way in: sign in with ChatGPT inside Flockbay
You do not need to run Codex at all to build on your ChatGPT plan. In Flockbay, open Connectors and press Sign in with ChatGPT on the ChatGPT row. Your browser opens OpenAI's sign-in, then brings you back. From then on you chat with Flockbay's own AI, in the chat beside the Godot editor, and it runs on your ChatGPT subscription. In the model menu, the ChatGPT row uses the model your ChatGPT account picks.
It needs ChatGPT Plus, Pro, Business, Enterprise or Edu. OpenAI keeps Free and Go to its own apps, so a Free or Go account signs in and then cannot build; Flockbay says so in Connectors and names the refusal when a message fails.
The difference from connecting Codex is who is driving. Here Flockbay's AI works the way the app intends: it asks one round of questions at a time, writes a short brief of what it will build first, and builds only when you approve it, using the same tools Codex would. You stay in one window, with no terminal. With Codex connected, you drive Codex, with your own habits and settings, and Flockbay supplies the tools. Generated art on a ChatGPT sign-in comes from your own Tripo or ElevenLabs keys; without them it builds from the library or with Godot's shapes.
Troubleshooting Codex with Flockbay
Codex says the flockbay-stage server failed to start or timed out. Codex gives a server 10 seconds to start by default. Add startup_timeout_sec = 20 under [mcp_servers.flockbay-stage] in config.toml. If it still fails, check the three paths in that entry against the line in the Flockbay dialog, which says in red when the app itself could not start it, and paste the current line again.
The server is not in /mcp. Run codex mcp list in a terminal. If it is not listed, paste the line again; it is global, so the folder does not matter.
Codex sees flockbay-stage but just one tool, a status check. The app is closed, has no game open, or has Another agent switched off in Connectors. Fix whichever it is and the rest of the tools join the session on their own. Still missing? Quit Codex and start it again.
Codex will not edit anything. The folder started read-only. Use /permissions to switch to Auto, or run git init in the game's folder so Codex picks Auto next time.
Codex reports the editor is closed, or that it has to wait. Scene and script changes go through the Godot editor the Flockbay app hosts, so open the game in the app first. A refused Play is on purpose: when you have used the builder since Codex last ran the game, the app hands Play to you instead. And while Flockbay's own AI has a turn running in that game, Codex is asked to hold off until it ends.
ChatGPT sign-in fails to build. Check your ChatGPT plan first. A Free or Go account is refused by OpenAI inside Flockbay; Plus or higher builds.
More on this: A guide to Godot MCP servers: install, connect, and use one well
What making games in Codex costs
Connecting Codex to Flockbay is free, and so is building on a ChatGPT sign-in. You pay OpenAI for your plan. As of 29 Sep 2026: Plus is $20 a month and includes Codex in the CLI, the IDE extension and on the web; Pro starts at $100 a month with five or twenty times Plus's Codex usage; Business is $25 a user a month, or $20 billed yearly. An API key is billed at API rates.
Flockbay also has optional plans that run the AI for you, each opening a band of models chosen by what they cost to run. What Flockbay costs has the detail.
What Codex cannot do here
It cannot decide whether the game is good. It can report that the coin left the scene and the sound played; you play the game, press Play or F5 in the editor, and judge whether it feels right.
The connection serves the game Flockbay has open. That can be a Godot project you already have: Flockbay asks once before it adds anything to it, and Codex works with the Godot tools there until you let a world tool in. To keep the project in your own editor instead, add a Godot MCP server that works there. Claude for Godot compares those servers, and Codex uses them the same way.
For now the app is Windows only, and building is online; a finished game plays without a connection. The code Codex writes here is GDScript, or C# when the game already uses it. The app is closed source, while Godot underneath is the official engine and every file of the game belongs to you.
Questions
- Can Codex make a game?
- It can write one on its own. Connected to Flockbay, it can also run the game, read its errors, inject input events and capture the viewport, so it fixes what breaks before it hands the game back. Whether the game is fun is still yours to judge.
- Do I need ChatGPT Plus to make games in Codex with Flockbay?
- For the Codex CLI, yes, Plus or higher, or an OpenAI API key. For the ChatGPT sign-in inside Flockbay, Plus, Pro, Business, Enterprise or Edu; Free and Go are refused by OpenAI there.
- What is the difference between connecting Codex and signing in with ChatGPT?
- Connecting Codex means you run Codex and it uses Flockbay's tools. Signing in with ChatGPT means Flockbay's own AI builds inside the app on your ChatGPT subscription, asking questions and writing a brief before it builds. Both use the same tools on the same game.
- Does the ChatGPT desktop app work with Flockbay?
- OpenAI's docs say the ChatGPT desktop app, the Codex CLI and the IDE extension share their MCP configuration, so the line you paste should reach all three. We have not tried the desktop app ourselves.
- Can I use an OpenAI API key instead of a ChatGPT plan?
- Yes. Codex signs in with a key through codex login --with-api-key. Inside Flockbay, add the key in Connectors under Your own API key; OpenAI bills you for what you use.
- Is there an official Codex integration?
- No. Codex supports MCP, the open protocol for giving an agent tools, and Flockbay serves its tools over it. Nothing goes into Codex beyond that one server entry and, if you want them, the skills.
- Does it work on a Mac?
- Codex does, but Flockbay does not yet: the app ships for Windows first, and the Mac version follows later.
Related
- Claude or ChatGPT with Godot
- How to make games in Claude Code
- Claude for Godot
- Connect your own agent
- Cursor for Godot
- Godot AI agent
- Making games from OpenCode
A free AI game maker built on Godot, for Windows. Connecting Codex is free, and so is building on a ChatGPT sign-in.
Download Flockbay free