Sbox MCP
MCP (Model Context Protocol) server for the s&box game engine editor β AI-powered scene manipulation, code execution, and editor automation
Ask AI about Sbox MCP
Powered by Claude Β· Grounded in docs
I know everything about Sbox MCP. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
sbox-mcp
MCP server giving Claude full real-time awareness of the S&Box editor.
30 tools β scene hierarchy, GameObjects, components, C# scripts, console output, assets, editor control.
Architecture
Claude Code (WSL)
β stdio (MCP protocol)
TypeScript MCP Server [Node.js, WSL]
β WebSocket ws://[windows-host]:27015
S&Box Bridge Addon [C#, inside S&Box editor]
β S&Box editor APIs
S&Box Editor
Setup
1. Install the S&Box addon
Copy the contents of addon/code/ into the S&Box toolbase code directory:
C:\Program Files (x86)\Steam\steamapps\common\sbox\addons\tools\Code\SboxMcp\
The final structure should look like:
addons\tools\Code\SboxMcp\
BridgeServer.cs
CommandRouter.cs
ConsoleCapture.cs
EditorPanel.cs
Handlers\
SceneHandler.cs
ComponentHandler.cs
FileHandler.cs
EditorHandler.cs
ConsoleHandler.cs
AssetHandler.cs
This puts the code inside local.toolbase β the package S&Box always compiles on startup.
Restart S&Box. Once it compiles, go to Editor β MCP Bridge β Open Panel.
It shows "Waiting for connection..." β this is normal until the MCP server connects.
2. Build the TypeScript MCP server
cd server
npm install
npm run build
3. Add to Claude Code
claude mcp add -s user sbox -- node /home/<you>/projects/sbox-mcp/server/dist/index.js
Restart Claude Code. The sbox MCP server will be active in all sessions.
Tools
| Category | Tools |
|---|---|
| Scene read | scene_get_info, scene_get_hierarchy, scene_get_object, scene_find_objects |
| Scene write | scene_create_object, scene_delete_object, scene_set_transform, scene_set_name, scene_set_enabled, scene_clone_object, scene_reparent_object, scene_save, scene_undo, scene_redo |
| Components | component_list, component_get, component_set, component_add, component_remove |
| Files | file_read, file_write, file_list, project_info |
| Editor | editor_get_selection, editor_select_object, editor_play, editor_stop, editor_is_playing |
| Console | console_get_output, console_run_command |
| Assets | asset_search, asset_mount, asset_browse_local |
WSL Networking
The TypeScript server auto-detects the Windows host IP from /etc/resolv.conf.
The S&Box addon binds to 0.0.0.0:27015 so it's reachable from WSL.
To use a different port:
SBOX_MCP_PORT=27015 node dist/index.js
Configuration
The addon auto-starts the WebSocket server when S&Box opens.
Use the MCP Bridge panel β Restart if the connection drops.
