How to Connect Codex to Roblox Studio (MCP Setup)

How to Connect Codex to Roblox Studio (MCP Setup)

Updated October 2026 · 4 min read

OpenAI's Codex can work inside Roblox Studio through Studio's built-in MCP server, the same way Claude Code does. Once it's connected, Codex can read and edit scripts, run Luau, insert assets and playtest in your open place.

What you need

  • Roblox Studio, updated to the latest version
  • Codex installed and signed in (with a ChatGPT plan or an OpenAI API key)
  • A place open in Studio

Step 1: Turn on the MCP server in Studio

  1. Open Assistant in Studio.
  2. Click the … menu, then Manage MCP Servers.
  3. Turn on Enable Studio as MCP server.

That's from Roblox's MCP docs. If Codex shows up in the Quick connect dropdown there, switch it on and skip to step 3.

Step 2: Add Studio to Codex

On Windows, Roblox installs a small script that starts the Studio MCP server. Add it to Codex from a terminal:

codex mcp add Roblox_Studio -- cmd.exe /c %LOCALAPPDATA%\Roblox\mcp.bat

Or add it by hand to Codex's config file, ~/.codex/config.toml:

[mcp_servers.Roblox_Studio]
command = "cmd.exe"
args = ["/c", '%LOCALAPPDATA%\Roblox\mcp.bat']

On a Mac, point it at the binary inside the app instead: /Applications/RobloxStudio.app/Contents/MacOS/StudioMCP.

Step 3: Check it worked

Restart Codex, then in Manage MCP Servers look for the green indicator that shows a client is connected. Ask Codex something small:

List the Roblox Studio windows you can see, then add a bright red part above the spawn and tell me if the output has errors.

If a red part appears, you're connected.

If it doesn't connect

  • Restart both Studio and Codex.
  • Check the MCP server toggle in Studio is still on.
  • In the config file, one missing quote or bracket stops the server from loading.
  • Only connect AI tools you trust: they can change your open places.

Codex or Claude Code?

Both are coding agents built for long, multi-step work, and both connect the same way. Use the one you already pay for. The comparison is in best AI for Roblox Studio, and the Claude Code steps are in connect Claude Code to Roblox Studio.

Larpings works with Codex too: it connects your ChatGPT plan to Roblox Studio, Blender and your notes, and checks the AI's work with Roblox bug checks and real playtests. See every feature.