🔌Set up and use Sandbox Studio MCP
Connect your agent to an open Sandbox Studio project through Sandbox Studio MCP, verify the local connection, and use prompts to create and refine scene content.
What Sandbox Studio MCP can do
Once your agent is connected, it can work in the open Sandbox Studio editor the same way you would: it reads the scene, then changes what is in it.
It can:
Read the scene and project — the node list, a node's properties and materials, what is selected, the active scene, Play mode state, assets, and build errors
Change the scene — add, delete, or move nodes; set properties; change materials and colours; place prefabs and primitives. The same edits work when you are inside a prefab
Manage scenes — open, save, create, duplicate, or switch the active scene
Drive the editor — enter or exit Play mode, frame the selection, undo and redo (including while editing a prefab), take screenshots
Work with assets — create folders and materials, import assets, rename or move files, merge meshes, install an asset pack
Navmesh — generate, clear, import or export a navmesh, and toggle debug view
Build — rebuild the project so new code classes show up in the editor, and bake lightmaps
Diagnose — read build errors and the editor console
Scene edits vs code edits
Use Sandbox Studio MCP for anything you can see and click in the editor: placement, transforms, materials, colours, lights, cameras, per-instance properties, prefab overrides, scene files, navmesh, and Play mode.
Use TypeScript (in your AI coding assistant, on project files) for reusable gameplay: new node classes, input, UI logic, networking, and systems.
New behaviour is written in code first, then placed and configured in the scene through Sandbox Studio MCP. Do not use one-off code to change how an editor-placed object looks — that is a scene edit.
Open AI Settings
In Sandbox Studio, open the menu, then App Settings, then AI Settings. Select the MCP tab.
The Assistant and Models tabs on this same window are for the in-editor chat (providers, pinned models, Default Agent Model). An external agent does not use those tabs. Setup for those tabs is on Installing Sandbox Studio.
Review the connection settings
On the MCP tab, note the local port in the status line. The current editor shows Running on port 17350 and the URL http://127.0.0.1:17350/mcp. If your port number is different, use the number shown on your screen.
Review Auto-Approve By Default and the permission list before allowing the MCP to change the project.
Refine the scene with a follow-up prompt
Describe the next change in relation to what is already present. Include placement, spacing, colour, lighting, scale, or material details that matter to the result.
Create a second house beside the first, leave a clear gap between them, and change the lighting to a warm sunset.
Review and correct the result
Inspect the updated scene and give a more specific follow-up when an object, material, or light does not look right. Sandbox Studio MCP can use the editor tools exposed to it to move and scale objects, create geometry, adjust materials, change lighting, and modify supported settings.
Troubleshooting
Work through Sandbox Studio first, then your agent. The MCP only works while Studio is running, a project is open, and your agent is talking to the same local port.
In Sandbox Studio
Confirm the project is open (not only the home screen).
Open the menu → App Settings → AI Settings → MCP.
Turn Enable Sandbox Studio MCP on. Status should show it is running.
Read the port on that tab (for example Running on port 17350 and
http://127.0.0.1:17350/mcp). If the number is different, your agent must use that number.If your agent reports unauthorized, connection details are stale. Use Configure on the MCP tab (or copy the connection details again) and reconnect in your agent.
In your agent
Connect Sandbox Studio MCP in your agent's MCP settings, reload it if the status is not connected, and confirm the same project folder is open.
In Cursor
Open Settings → Customise → MCP.
Find Sandbox Studio MCP. If it is off, enable it.
If status is not green, use Reload on that MCP entry.
If more than one MCP row points at the same Sandbox Studio server, open each one and check the user/account and URL. Duplicate connections to the same port confuse the client — keep one working row and disable or remove the extras.
Confirm Cursor has the same project folder open as Sandbox Studio.
Symptoms
MCP is not connected
Studio running, project open, Enable Sandbox Studio MCP on, then reload the MCP in your agent. In Cursor, Reload is under Customise → MCP, and a green status means connected. Match the port on Studio's MCP tab.
Unauthorized / auth error
Re-run Configure (or recopy connection details) in Studio AI Settings → MCP, then reconnect in your agent.
No project / project_none / agent cannot see a scene
Open a project in Sandbox Studio and leave it in the editor. Home-only is not enough.
Wrong scene or no tools
Same folder in your agent and Studio. One MCP connection, not two copies of Sandbox Studio MCP.
Port conflict or connection refused
Only one Studio instance using that port. Use the port printed in AI Settings → MCP, not an old number from a previous session.
Tools run but the scene does not change
Approvals: check Auto-Approve and the permission list on Studio's MCP tab, and any pending approval in your agent.
What you’ve done
Sandbox Studio MCP is now connected to your agent and can carry out supported Sandbox Studio editor actions through clear, reviewable prompts. Start with small changes, check the scene after each request, and refine the result with specific follow-ups.
Last updated
Was this helpful?

