Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
Connect AI coding assistants to the S&box editor using the Model Context Protocol (MCP). While you're building your game, your AI assistant can see inside the editor in real time — reading your scene, listing GameObjects, and running console commands — without any copy-pasting.
Jump to setup instructionsNo tool list is on record. This does not mean the server has no tools. Tools were not run.
No setup evidence yet No matching config or report on record. This does not mean the server is incompatible.
Fetched from the repository for this visit.
Connect AI coding assistants to the S&box editor using the Model Context Protocol. While you're building your game, your AI assistant can see inside the editor in real time — querying your scene, inspecting GameObjects, reading and writing component property values, spawning prefabs, controlling play mode, and running console commands — without any copy-pasting.
localhost:8098get_scene_summaryReturns a high-level overview of the active scene: total/root/enabled/disabled object counts, all unique tags in use, a component-type frequency breakdown, a prefab source breakdown (which prefabs have how many instances), a network mode distribution, and a root object list. Start here to orient yourself before drilling into specifics.
find_game_objectsSearch and filter GameObjects by any combination of:
nameContains — case-insensitive name substringhasTag — objects that carry a specific taghasComponent — objects with a component whose type name contains the given stringpathContains — objects whose full scene path contains the string (e.g. "Units/")enabledOnly — skip disabled objects (default: false — disabled objects are included)isNetworkRoot — filter to network roots or non-rootsisPrefabInstance — filter to prefab instances or non-instancesmaxResults — cap results (default 50, max 500)sortBy — sort by "name", "distance" (requires sortOriginX/Y/Z), or "componentCount"Returns a flat list with ID, scene path, tags, component types, world position, child count, isPrefabInstance, prefabSource, isNetworkRoot, and networkMode.
find_game_objects_in_radiusFind all GameObjects within a world-space radius of a point, sorted by distance. Useful for spatial questions: "what's near the player?", "which resource nodes are close to my building?", "what units are within attack range?". Supports hasTag, hasComponent, and enabledOnly filters. Results include distanceFromOrigin.
get_game_object_detailsGet full details for a single GameObject by id (GUID, preferred) or name. Returns world and local transform, all components with enabled state, tags, parent reference, children summary, network mode, prefab source, and isNetworkRoot. Set includeChildrenRecursive=true to get the full subtree in one call.
get_component_propertiesGet the runtime property values of a specific component on a GameObject. Returns all readable public properties with their current values. Requires componentType (case-insensitive substring match) plus either id or name.
get_scene_hierarchyLists the scene as an indented tree. Supports rootOnly=true, includeDisabled=false, and rootId to walk only a specific subtree by GUID. For large scenes, prefer find_game_objects or get_scene_summary.
get_prefab_instancesFind all instances of a specific prefab, or get a full breakdown of all prefabs and their instance counts. prefabPath is matched as a case-insensitive substring. Omit it to get the full breakdown.
create_game_objectCreate a new empty GameObject in the current scene. Accepts name and optional parentId (GUID).
add_componentAdd a component to a GameObject by exact C# class name (e.g. "PointLight", "ModelRenderer"). Requires componentType plus either id or name.
remove_componentRemove a component from a GameObject. Matches componentType as a case-insensitive substring.
set_component_propertySet a property on a component. Supports string, bool, int, float, Vector3 ({x,y,z}), and enum values. Requires propertyName and value; optionally scoped by componentType.
destroy_game_objectDelete a GameObject by id or name.
reparent_game_objectMove a GameObject under a new parent. Pass parentId="null" to move to scene root.
set_game_object_tagsSet, add, or remove tags on a GameObject. Use set (array) to replace all tags, or add/remove arrays for incremental changes.
set_game_object_transformSet position, rotation, and scale of a GameObject in one call. Accepts position, rotation, and scale objects. Requires id or name.
duplicate_game_objectClone a GameObject with optional new position and name. Accepts id/name, position, and newName.
set_game_object_enabledToggle a GameObject's enabled state. Pass id/name and enabled; omit enabled to toggle.
set_game_object_nameRename a GameObject. Requires newName and id or name.
set_component_enabledToggle a component's enabled state. Requires componentType, enabled, and id or name.
instantiate_prefabSpawn a prefab at a world position. Accepts path (prefab asset path), x/y/z, and optional parentId. Use browse_assets with type="prefab" to find valid paths first.
save_sceneSave the currently open scene or prefab to disk.
undoUndo the last editor operation.
redoRedo the last undone editor operation.
browse_assetsSearch project assets by type and/or name. Use this to find model paths (.vmdl), prefab paths, materials (.vmat), sounds (.vsnd), scenes, etc. Supports type, nameContains, and maxResults filters. Results include the full asset path.
get_editor_contextReturns what the S&box editor currently has open: active scene name, all open editor sessions (scene or prefab), current selection, and whether the game is playing. Call this first to determine whether to target Game.ActiveScene or an editor prefab session.
get_model_infoReturn bone count, attachment points, and sequence info for a .vmdl model. Requires path.
get_material_propertiesReturn shader name and surface properties for a .vmat material. Requires path.
get_prefab_structureReturn the full object/component hierarchy of a .prefab file without opening it in the editor. Reads the raw prefab JSON from disk. Requires path.
reload_assetForce reimport/recompile of a specific asset — useful after modifying source files on disk. Requires path.
get_component_typesList all available component types via TypeLibrary, so AI knows what components can be added. Supports a filter parameter.
search_assetsSearch assets by content (file extension filter + substring matching on name and path). Supports query, type, and maxResults.
get_scene_statisticsEnhanced scene summary with component type frequency, prefab breakdown, network mode distribution, and tags.
select_game_objectSelect a GameObject in the editor hierarchy and viewport by id or name.
open_assetOpen an asset in its default editor (scene, prefab, material, etc.). Requires path.
get_play_stateReturns the current play state: "Playing" or "Stopped".
start_play_modePress the Play button in the editor.
stop_play_modePress the Stop button in the editor.
get_editor_logReturn recent log lines captured from the editor output. Accepts lines (default 50).
get_selected_objectsReturn the currently selected objects in the editor.
set_selected_objectsSelect multiple objects at once. Requires ids (array of GUIDs).
clear_selectionClear the editor selection.
list_console_commandsList all [ConVar]-attributed console variables registered in the game, with their current values, help text, flags, and declaring type. Use this before run_console_command to discover valid command names. Supports a filter parameter to narrow results.
run_console_commandGet or set a console variable. Pass just the name to read its current value; pass name value to set it. Errors are returned as text rather than thrown as exceptions.
create_blockCreates a primitive block mesh using PolygonMesh. Compatible with S&box mesh editing tools. Accepts x/y/z (position), sizeX/Y/Z, name, and materialPath.
set_face_materialApplies a material to a specific face or all faces of a mesh. Requires materialPath, optional faceIndex (-1 for all faces) and gameObjectId/name.
set_texture_parametersSets texture mapping parameters (UV axes and scale) for faces. Accepts uAxisX/Y/Z, vAxisX/Y/Z, scaleU, scaleV, and faceIndex.
set_vertex_positionSets the position of a vertex by index for displacement/sculpting. Requires vertexIndex, x/y/z, and gameObjectId/name.
set_vertex_colorSets the vertex color for vertex painting. Requires vertexIndex, r/g/b/a (0-1), and gameObjectId/name.
set_vertex_blendSets the vertex blend weights for terrain/texturing. Requires vertexIndex, r/g/b/blend (0-1), and gameObjectId/name.
get_mesh_infoQueries detailed information about a mesh including vertex/face counts, bounds, and per-face materials. Requires gameObjectId or name.
create_lightCreates a GO with a light component (PointLight, SpotLight, or DirectionalLight). Accepts type, x/y/z, color, shadows, radius, attenuation, coneOuter, coneInner, and name.
configure_lightSets properties on an existing Light component. Supports color, shadows, radius, attenuation, coneOuter, coneInner, fogMode, fogStrength, and skyIndirectLighting.
create_sky_boxCreates a GO with a SkyBox2D component for sky rendering. Accepts skyMaterial path, tint color, and skyIndirectLighting toggle.
set_sky_boxConfigures an existing SkyBox2D component. Supports skyMaterial, tint, and skyIndirectLighting.
create_ambient_lightCreates a scene-level AmbientLight for global ambient illumination. Accepts color, x/y/z, and name.
add_colliderAdds a collider component (BoxCollider, SphereCollider, CapsuleCollider, or ModelCollider) to a GameObject with configured properties including center, size/radius, friction, elasticity, isTrigger, and surfaceVelocity.
configure_colliderModifies properties on an existing Collider component. Supports all the same properties as add_collider.
add_rigidbodyAdds a Rigidbody component to a GameObject for physics simulation. Accepts mass, gravity, gravityScale, linearDamping, and angularDamping.
create_sound_pointCreates a GO with a SoundPointComponent for spatial audio. Accepts x/y/z, name, soundEvent path, volume, pitch, playOnStart, and repeat.
configure_soundConfigures an existing BaseSoundComponent on a GameObject. Supports soundEvent, volume, pitch, playOnStart, repeat, distanceAttenuation, and distance.
create_cameraCreates a GO with a CameraComponent. Accepts x/y/z, pitch/yaw/roll, name, fov, zNear, zFar, isMainCamera, orthographic, and orthographicHeight.
configure_cameraConfigures an existing CameraComponent. Supports fov, zNear, zFar, isMainCamera, orthographic, orthographicHeight, backgroundColor, and priority.
create_particle_effectCreates a GO with a ParticleEffect component. Accepts x/y/z, name, maxParticles, lifetime, timeScale, and preWarm.
configure_particle_effectSets properties on an existing ParticleEffect. Supports maxParticles, lifetime, timeScale, and preWarm.
create_fog_volumeCreates a GO with a fog volume component (GradientFog or VolumetricFogVolume). Accepts fogType, color, height, startDistance, endDistance, falloffExponent, and strength.
configure_post_processingCreates a PostProcessVolume on an existing or new GO for post-processing effects. Accepts priority, blendWeight, blendDistance, and editorPreview.
create_environment_lightCreates a complete environment lighting setup in one call: DirectionalLight (sun) + AmbientLight + SkyBox2D. Accepts sunDirection (pitch yaw roll), sunColor, ambientColor, and skyMaterial.
get_asset_dependenciesReturns all assets referenced by a given asset (materials, textures, etc.). Requires assetPath.
batch_transformApplies a position offset {x,y,z} to multiple objects at once. Requires ids (array of GUIDs) and position.
copy_componentCopies a component from one GameObject to another. Requires sourceId, targetId, and componentType.
get_object_boundsReturns the world-space bounding box of a GameObject. Requires id or name.
If you want to track this library as a git submodule in your S&box project (rather than installing via the Library Manager), add it under your project's Libraries/ directory:
git submodule add https://github.com/ozmium7/Ozmium-MCP-Server-for-Sbox.git Libraries/ozmium.oz_mcp
This will create an entry in your .gitmodules like:
[submodule "Libraries/ozmium.oz_mcp"]
path = Libraries/ozmium.oz_mcp
url = https://github.com/ozmium7/Ozmium-MCP-Server-for-Sbox.git
When cloning a project that already has this submodule registered, initialize and pull it with:
git submodule update --init --recursive
To update the submodule to the latest commit on its remote:
git submodule update --remote Libraries/ozmium.oz_mcp
mcp_config.json for Claude Desktop):{
"mcpServers": {
"sbox": {
"url": "http://localhost:8098/sse",
"type": "sse"
}
}
}
| File | Responsibility |
|---|---|
SboxMcpServer.cs | HTTP/SSE transport — listener, session management, SSE writes |
McpSession.cs | Session state (SSE connection + lifecycle) |
RpcDispatcher.cs | JSON-RPC method routing — maps tool names to handler calls |
OzmiumReadHandlers.cs | Tool logic for all scene-read tools |
OzmiumWriteHandlers.cs | Tool logic for all scene-write tools (create, add/remove component, set property, destroy, reparent, tags, instantiate, save, undo/redo) — also owns write tool schemas |
OzmiumAssetHandlers.cs | Tool logic for asset-query tools (browse, model info, material, prefab structure, reload) — also owns asset tool schemas |
OzmiumEditorHandlers.cs | Tool logic for editor-control tools (select, open asset, play state, play/stop, editor log, console commands) — also owns editor tool schemas |
MeshEditHandlers.cs | Mesh editing tools (create block, face materials, texture params, vertex position/color/blend, mesh info) |
LightingToolHandlers.cs | Lighting tools (create/configure light, sky box, ambient light) |
PhysicsToolHandlers.cs | Physics tools (add/configure collider, add rigidbody) |
AudioToolHandlers.cs | Audio tools (create/configure sound point) |
CameraToolHandlers.cs | Camera tools (create/configure camera) |
EffectToolHandlers.cs | Effect & environment tools (particle effects, fog volumes, post-processing, environment light) |
UtilityToolHandlers.cs | Utility tools (asset dependencies, batch transform, copy component, object bounds) |
AssetToolHandlers.cs | Legacy asset handler (superseded by OzmiumAssetHandlers) |
ConsoleToolHandlers.cs | Tool logic for list_console_commands and run_console_command |
ToolHandlerBase.cs | Shared handler utilities (TextResult, AppendHierarchyLine) |
SceneToolHandlers.cs | Legacy scene-read handlers (superseded by OzmiumReadHandlers) |
SceneToolDefinitions.cs | MCP tool schemas for scene-read tools |
AssetToolDefinitions.cs | MCP tool schemas for browse_assets and get_editor_context |
ConsoleToolDefinitions.cs | MCP tool schemas for console tools |
ToolDefinitions.cs | Aggregates all schemas for tools/list |
OzmiumSceneHelpers.cs | Scene resolution, tree walking (WalkAll/WalkSubtree), object builders (BuildSummary/BuildDetail), path/tag/component helpers |
SceneQueryHelpers.cs | Legacy scene helpers (superseded by OzmiumSceneHelpers) |
McpServerWindow.cs | Editor UI panel |
To add a new tool: add its schema (either inline in the handler file or in a *ToolDefinitions.cs file), implement its handler, register it in ToolDefinitions.All, and add a case to the switch in RpcDispatcher.cs.
WalkAll / WalkSubtree in OzmiumSceneHelpers replace scene.GetAllObjects(true) everywhere. The s&box API's GetAllObjects does not traverse into disabled parent subtrees; the manual walk does.get_component_properties uses standard .NET reflection (GetProperties) to read public instance properties at runtime. It handles Vector3, Enum, primitives, and strings with graceful fallback for unreadable properties.set_component_property also uses reflection to write properties, with a ConvertJsonValue helper that coerces JSON strings/numbers/booleans/objects into the correct .NET type (including Vector3 and enums).list_console_commands enumerates [ConVar]-attributed static properties across all loaded assemblies via AppDomain.CurrentDomain.GetAssemblies(), since ConsoleSystem has no enumeration API.run_console_command uses ConsoleSystem.GetValue/SetValue and is dispatched outside the normal async path so that engine exceptions are reliably catchable.get_prefab_structure reads the raw prefab JSON from disk via AssetSystem.FindByPath + File.ReadAllText, since PrefabFile does not expose a live scene when not open in the editor.get_editor_log captures log lines into a concurrent ring buffer (MaxLogLines = 500) fed by the editor's log callback.A special thank you to Oldschoola for their outstanding contributions and ideas that helped shape and improve this project!
Loading reviews...
GitHub checked 136h ago - refresh overdue. Recently viewed repositories target hourly refresh.
Find a documented setup for your client. No sign-in, installation, or tool execution.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.