Version: 1.4.1
Nexus Unity exposes two supported public API surfaces:
- Raw HTTP JSON-RPC: 117 Unity Editor methods returned by
list_tools. - MCP bridge: 14 consolidated
unity_tools defined inEditor/nexus_bridge/schemas.py.
Raw requests use unprefixed method names:
curl -s http://127.0.0.1:8081/ \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"get_server_status","params":{},"id":1}'Call list_tools at runtime for full JSON schemas. MCP bridge aliases use the unity_ prefix for the same raw method when directly routed.
Schema compatibility notes:
unity_write_and_compileis the supported code-edit macro. Older references tounity_apply_code_changeare stale and should be replaced.update_componentaccepts the preferredpropertiesobject and the legacyjson_datastring form.create_sceneaccepts optionalpathandopen_if_exists, so agents can create or reopen a deterministic scene asset in one call.create_primitiveaccepts optionalname,parent_id,position,rotation,scale, andmaterial_pathfor visible non-origin object creation.set_transformacceptsposition,rotation/eulerAngles, andscale/localScale.create_materialaccepts optionalpath,base_color/color, andemission_colorso callers can create visible materials in a chosen folder.write_fileandwrite_files_batchcreate missing parent directories after path validation.invoke_method.argumentsis an optional JSON array of positional arguments.click_object_in_gameaccepts eitherinstance_idor hierarchypath.
scene_delta/unity_scene_deltasymbol_index/unity_symbol_indexinvoke_method/unity_invoke_methodget_selected_object_full_context/unity_get_selected_object_full_contextshow_unresolved_missing_references/unity_show_unresolved_missing_referencesget_editor_timeline/unity_get_editor_timelinedump_scene_graph/unity_dump_scene_graphcompact_scene_snapshot/unity_compact_scene_snapshotget_scene_dependencies/unity_get_scene_dependenciesget_server_status/unity_get_server_statusattach_existing_session/unity_attach_existing_sessionping_main_thread/unity_ping_main_threadget_tool_usage_stats/unity_get_tool_usage_statsreset_tool_usage_stats/unity_reset_tool_usage_statsshutdown_server/unity_shutdown_serverbatch_execute/unity_batch_executesimulate_mouse/unity_simulate_mousesimulate_touch/unity_simulate_touchclick_object_in_game/unity_click_object_in_gamewait_for_asset_import_idle/unity_wait_for_asset_import_idlewait_for_editor_idle/unity_wait_for_editor_idleread_scriptable_object/unity_read_scriptable_objectupdate_scriptable_object/unity_update_scriptable_objectpatch_scriptable_object/unity_patch_scriptable_objectcreate_scriptable_object_asset/unity_create_scriptable_object_assetduplicate_scriptable_object_asset/unity_duplicate_scriptable_object_assetlist_fields_for_type/unity_list_fields_for_typediff_scriptable_objects/unity_diff_scriptable_objectsdiff_scriptable_object_against_defaults/unity_diff_scriptable_object_against_defaultsget_player_pref/unity_get_player_prefset_player_pref/unity_set_player_prefdelete_player_pref/unity_delete_player_preflist_player_prefs/unity_list_player_prefscapture_inspector_screenshot/unity_capture_inspector_screenshotcapture_game_view_screenshot/unity_capture_game_view_screenshotgenerate_mermaid_diagram/unity_generate_mermaid_diagramsemantic_find/unity_semantic_findenforce_forced_defaults/unity_enforce_forced_defaultsinspect_object/unity_inspect_objectlint_project/unity_lint_projectcreate_scene/unity_create_sceneopen_scene/unity_open_scenesave_scene/unity_save_scenelist_scenes/unity_list_scenescreate_game_object/unity_create_game_objectcreate_primitive/unity_create_primitivedestroy_game_object/unity_destroy_game_objectduplicate_object/unity_duplicate_objectset_active/unity_set_activeset_parent/unity_set_parentset_sibling_index/unity_set_sibling_indexcreate_hierarchy/unity_create_hierarchyadd_component/unity_add_componentremove_component/unity_remove_componentinspect_component/unity_inspect_componentcomponent_values/unity_component_valuesget_component_schema/unity_get_component_schemaupdate_component/unity_update_componentset_transform/unity_set_transformset_property/unity_set_propertyset_enabled/unity_set_enabledlist_assets/unity_list_assetsexplore_asset/unity_explore_assetcreate_material/unity_create_materialrefresh_asset_database/unity_refresh_asset_databaseimport_asset/unity_import_assetinstantiate_prefab/unity_instantiate_prefabcreate_prefab/unity_create_prefabapply_prefab_overrides/unity_apply_prefab_overridesrevert_prefab_overrides/unity_revert_prefab_overridesget_prefab_overrides/unity_get_prefab_overridesedit_prefab_asset/unity_edit_prefab_assetmove_asset/unity_move_assetdelete_asset/unity_delete_assetcopy_asset/unity_copy_assetget_dependencies/unity_get_dependenciescreate_folder/unity_create_folderread_file/unity_read_filewrite_file/unity_write_filewrite_files_batch/unity_write_files_batchundo/unity_undoredo/unity_redotoggle_play_mode/unity_toggle_play_modepause_play_mode/unity_pause_play_modestep_frame/unity_step_frameexecute_menu_item/unity_execute_menu_itemfocus_scene_view/unity_focus_scene_viewopen_prefab_stage/unity_open_prefab_stageclose_prefab_stage/unity_close_prefab_stageread_logs/unity_read_logsread_logs_since_cursor/unity_read_logs_since_cursorclear_logs/unity_clear_logsattach_script/unity_attach_scriptwait_for_ready/unity_wait_for_readyrun_tests/unity_run_testsget_test_results/unity_get_test_resultsget_game_object/unity_get_game_objectget_active_game_object/unity_get_active_game_objectget_root_game_objects/unity_get_root_game_objectsget_object_path/unity_get_object_pathfind_objects/unity_find_objectsfind_by_path/unity_find_by_pathfind_references/unity_find_referencesget_tags_and_layers/unity_get_tags_and_layersping_object/unity_ping_objectget_children/unity_get_childrenget_editor_state/unity_get_editor_stateget_project_info/unity_get_project_infoset_selection/unity_set_selectionui_list_windows/unity_ui_list_windowsui_get_hierarchy/unity_ui_get_hierarchyui_get_window_rect/unity_ui_get_window_rectui_set_window_rect/unity_ui_set_window_rectui_capture_window_snapshot/unity_ui_capture_window_snapshotui_query_elements/unity_ui_query_elementsui_click/unity_ui_clickui_input_text/unity_ui_input_text
The MCP bridge is the recommended AI-client surface. It exposes 14 tools and two static read-only resources through resources/list.
unity://docs/api-reference: API reference metadata.unity://docs/setup: setup guide metadata.
Actions: create, open, save, list. Aliases: create_scene, open_scene, save_scene, list_scenes.
create accepts optional path and open_if_exists for deterministic scene assets.
Actions: create_empty, create_primitive, create_hierarchy, destroy, duplicate, rename, set_name, set_transform, set_active, set_parent, set_sibling_index.
Aliases: create, create_gameobject, and create_game_object map to create_empty. create_primitive accepts name, parent_id, position, rotation, scale, and material_path.
Actions: add, remove, inspect, get_schema, update_properties, set_property, set_enabled.
Strategies: regex, path, semantic, references.
Actions: search, explore, create_material, import, refresh, instantiate_prefab, create_prefab, apply_overrides, revert_overrides.
create_material passes through path, base_color / color, and emission_color.
Actions: undo, redo, play, pause, step, menu, read_logs, clear_logs, get_state, get_server_status, refresh_assets, run_tests, get_test_results, run_tests_wait, get_tool_usage_stats, reset_tool_usage_stats.
run_tests_wait triggers run_tests and polls raw get_test_results from the Python bridge so Unity's main thread is not blocked while the agent waits.
Actions: list_windows, get_hierarchy, query, get_window_rect, set_window_rect, capture_window_snapshot, click, input.
get_hierarchy accepts deep. query accepts name, text, and class_name. Window rect and snapshot actions are intended for resize/layout QA; window snapshots include rect and hierarchy, with best-effort PNG image capture on macOS.
Conditions: compilation, play_mode, import, editor_idle.
Actions: get, set, delete, list.
Writes one or more files, waits for Unity compilation/import work, and returns compiler errors.
This is the public MCP bridge macro for code edits. Use it instead of old internal or stale documentation references to unity_apply_code_change.
Invokes a C# method on a component through reflection.
arguments is an optional positional JSON array. Omit it for parameterless methods.
Returns a recursive tree of the active scene.
Returns a scene-wide dependency map.
Runs the deterministic project audit.