Guide · 7 min read · Updated November 2026
How to use Codex with Roblox Studio
OpenAI's Codex can act inside your open Roblox Studio place through the MCP server Roblox built into Studio: read and edit scripts, search the Explorer, run Luau, insert assets, start a playtest, read the console and take a screenshot. The setup is one command or five lines of config, and the same configuration is shared by the Codex CLI, the Codex IDE extension and the ChatGPT desktop app. Here is how, and how to prompt it so it tests what it builds.
Step 1: turn on Studio's MCP server
In Roblox Studio open the place, then Assistant ▸ ⋯ ▸ Manage MCP Servers ▸ Enable Studio as MCP server. Roblox's own note: MCP clients can read and modify content in your open places; connect only clients you trust. The server listens on your computer only. Per Roblox's Connect to the Roblox Studio MCP server page, checked November 4, 2026.
Step 2a: Quick connect
In the same MCP Servers section, expand Quick connect. Studio lists installed clients; Codex CLI is one of them (with Claude Code, Claude Desktop, Cursor, Gemini CLI, Antigravity and Visual Studio Code). Turn it on, restart Codex, and Studio's indicator turns green with the client count.
Step 2b: one command, or config.toml
Codex adds a stdio MCP server with codex mcp add <name> -- <command>. On Windows, in Command Prompt:
codex mcp add Roblox_Studio -- cmd.exe /c %LOCALAPPDATA%\Roblox\mcp.bat
On a Mac:
codex mcp add Roblox_Studio -- /Applications/RobloxStudio.app/Contents/MacOS/StudioMCP
The same thing by hand, in ~/.codex/config.toml (a trusted project can also carry .codex/config.toml), Windows version:
[mcp_servers.Roblox_Studio]
command = "cmd.exe"
args = ["/c", "%LOCALAPPDATA%\\Roblox\\mcp.bat"]
Mac: command = "/Applications/RobloxStudio.app/Contents/MacOS/StudioMCP" and no args. The IDE extension and the ChatGPT desktop app read the same file; the desktop app also has Settings ▸ MCP servers ▸ Add server and the extension has the gear menu ▸ MCP servers. Per OpenAI's Codex MCP documentation, checked November 4, 2026. Restart Codex after adding the entry.
What Codex can do once connected
Studio's server publishes script_read, multi_edit, script_search, script_grep, generate_mesh, generate_material, generate_procedural_model, wait_job_finished, search_asset, insert_asset, upload_image, store_image, subagent, search_game_tree, inspect_instance, execute_luau, get_studio_state, start_stop_play, get_console_output, screen_capture, character_navigation, user_keyboard_input, user_mouse_input, http_get, skill and list_roblox_studios (Roblox's list, checked November 4, 2026). So Codex can read and edit scripts, inspect and search the Explorer, run Luau in edit mode to build instances, insert Creator Store assets, generate meshes, run a playtest, read the Output window, capture the viewport and simulate input during a test. It cannot touch the Roblox website (passes and products are created in the Creator Dashboard) and it does nothing while Studio is closed.
How to prompt Codex in Studio
- Read first. "Search the game tree and read the existing scripts before changing anything."
- State the server rule. "Economy and purchases on the server; the client only requests; validate every remote."
- Demand proof. "Start a playtest, wait 5 seconds, read the console, screenshot, stop the test, fix errors and repeat." Codex stops at the edit if you do not ask.
Read my place first. Add a 10-stage obby in Workspace/Stages with server-side checkpoints
that set RespawnLocation and a Stage leaderstat. Then start a playtest, read the console,
screenshot the viewport and stop the test. Fix any errors and run it again.
Our prompt library prompts work in Codex with one caveat: they name ForgeUI, ForgeFX and ProfileStore, which Forge installs for you. In Codex, describe the UI and effects you want, and ask it to insert ProfileStore from the Creator Store for saving.
Limits to know
- Scripts cannot be edited during a playtest; Codex must stop the test first.
- Run one agent per place. Two clients editing the same script will fight.
- Start a new session per feature; tool output adds up.
- Keep approvals on for
execute_luauandmulti_editin a real project.
The no-setup alternative
Forge runs this loop for you on Windows: the signed Forge Bridge pairs itself with your Studio, Claude Sonnet 5.5 (or Opus 5.5 and Fable 5.2) builds with playbooks for the systems Roblox games share, writes a design brief first, critiques its own work, checks phone and console, playtests and sends a screenshot on every message. No OpenAI or Anthropic subscription; prepaid credits from $10 with trial credits on the first pairing. Mac is planned. Side by side with the do-it-yourself route: Forge vs Cursor and Rojo.
Questions
Which Codex surfaces support MCP?
Per OpenAI's documentation (checked November 4, 2026), the Codex CLI, the Codex IDE extension and the ChatGPT desktop app all support MCP servers and share one configuration. ChatGPT on the web does not read local Codex config, so Studio's local server is not reachable from the website.
Do I need a paid ChatGPT plan?
Codex access depends on your ChatGPT plan; check OpenAI's current plan pages, which change. Roblox's MCP server itself is free. Forge, the alternative at the end, needs no OpenAI or Anthropic subscription: prepaid credits from $10.
Does this work on a Mac?
Yes. Roblox Studio runs on Mac and the MCP command for Mac is the StudioMCP binary inside the Studio app. Codex runs on Mac, and on Windows natively or through WSL. (Forge is Windows-only today.)
Is it safe?
Roblox's documentation says MCP clients can read and modify content in your open places and to connect only clients you trust. The server listens on your own computer only. Keep Codex's approval mode on for anything that executes Luau or edits scripts in a real project.
Related guides
- How to use Cursor with Roblox Studio: the same setup for Cursor.
- How to use Claude with Roblox Studio: Claude Code and Claude Desktop.
- Roblox Studio MCP not connecting: 12 fixes: when the indicator stays grey.
- Roblox Studio's MCP server, explained: what the server exposes and what it cannot reach.