MCP server suite for the s&box game engine
Each server has a distinct role. The Editor runs inside s&box; the API and Docs servers run standalone.
Scene manipulation, code compilation, asset management, terrain editing. Runs inside the s&box editor as a C# library plugin.
Offline type and member reference. Indexes ~1,800 types and ~15,000 members from the s&box CDN schema. Also fetches PBR textures from ambientCG and Poly Haven.
Narrative documentation fetcher. Fetches raw Markdown from sbox.game via .md endpoints, strips front-matter, caches with LRU.
22 omnibus tools, 178 actions. Each takes a required action parameter to select the operation.
summary hierarchy statistics find find_in_radius get_details prefab_instancescreate destroy duplicate reparent rename enable set_tags set_transform batch_transformadd remove set_property set_enabled get_properties get_types copytrigger status errors generate_solution waitinstantiate get_structure get_instances break update create save_overrides revert get_overridesbrowse search open get_dependencies get_model_info get_material_properties get_mesh_info get_bounds get_unsaved get_status get_json get_referencescreate delete rename move save reload get_referencesselect get_selected set_selected clear_selection frame_selection get_play_state start_play stop_play get_log save_scene save_scene_as save_all undo redo console_list console_run open_code_file get_preferences set_preferencelist set_active load_scenecreate configure create_skybox set_skyboxadd_collider configure_collider add_rigidbody create_model_physics create_character_controller create_jointcreate configurecreate configure_particle configure_post_processingcreate configure capture_viewport capture_tour orbit_capturecreate_block create_plane create_cylinder create_wedge create_arch create_clutter extrude_faces remove_faces add_face clip_faces scale_mesh thicken_faces bevel_edges bevel_vertices split_edges quad_slice_faces dissolve_edges bridge_edges connect_vertices flip_faces extend_edges set_face_material set_texture_params set_vertex_position set_vertex_color set_vertex_blend get_infocreate_agent create_area create_link generate get_status query_pathsearch get_package get_versions mountget_collision set_collision_rule get_input get_infocreate configure get_info get_height get_height_region set_height noise erode stamp add_material remove_material get_material_at blend_materials set_hole paint_material import_heightmap export_heightmap sync28 C# source files organized into Core infrastructure and per-tool Handlers.
ArenulaMcpServer HTTP/SSE listener and session management. RpcDispatcher extracts tool name + action, routes to the correct handler. ToolRegistry holds all 22 tool schemas. HandlerBase provides response formatting, pagination, and error helpers. SceneHelpers handles scene resolution and tree walking.
One file per tool. Each exports a Handle(action, args) method with an internal switch on the action enum. Async handlers (CompileHandler, CloudHandler) use HandleAsync and dispatch before GameTask.MainThread() to prevent deadlocks.
Scene APIs must run on the main thread. The dispatcher calls await GameTask.MainThread() before invoking sync handlers. Async handlers (network/compile) run on the background thread and may internally switch to main thread for specific sub-operations.
Following Anthropic's MCP tool design guidance.
Related operations grouped with action enum parameter. Fewer tools means less selection ambiguity for the LLM.
3-4 sentences per tool explaining what it does, when to use it, and when not to. Negative guidance prevents misuse.
Canonical {id, name} tuples. Pagination with offset/limit. 16K character truncation. Concise and detailed modes.
Structured errors with action context and suggestions. Fuzzy type matching: "Did you mean Rigidbody?"
additionalProperties: false on every schema. Enum constraints on actions and sub-types. Prevents hallucination.
Network tools dispatch before MainThread to avoid deadlocks. Never block the main thread with synchronous waits.
# Copy into your s&box project's Libraries folder Arenula-MCP/editor/ --> YourProject/Libraries/arenula_mcp/
# From the Arenula-MCP directory
npm run setup
{
"mcpServers": {
"editor": { "type": "sse", "url": "http://localhost:8098/sse" },
"api": { "command": "node", "args": ["path/to/Arenula-MCP/api/dist/index.js"] },
"docs": { "command": "node", "args": ["path/to/Arenula-MCP/docs/dist/index.js"] }
}
}
Arenula Editor compiles automatically and starts the MCP server on port 8098.