execute_menu_item
Executes Unity menu items (functions tagged with the MenuItem attribute)
How to use it
execute_menu_item is exposed by the MCP Unity MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the execute_menu_item tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install MCP Unity
npx @modelcontextprotocol/inspector node Server~/build/index.jsOther tools in MCP Unity (32)
Adds an asset from the AssetDatabase to the Unity scene
Installs new packages in the Unity Package Manager
Assigns a material to a GameObject's Renderer component
Executes multiple tool operations in a single batch request, reducing round-trips and enabling atomic operations with optional rollback on failure
Creates a new material with specified shader and saves it to the project
Creates a prefab with optional MonoBehaviour script and serialized field values
Creates a new scene and saves it to the specified path
Deletes a GameObject from the scene
Deletes a scene by path or name and removes it from Build Settings
Duplicates a GameObject in the scene with optional renaming and reparenting
Retrieves logs from the Unity console with pagination support
Gets detailed information about a specific GameObject including all components
Gets detailed information about a material including shader and all properties
Gets Unity play mode status (isPlaying, isPaused)
Gets information about the active scene including name, path, dirty state, and all loaded scenes
Loads a scene by path or name, with optional additive loading
Modifies properties of an existing material (colors, floats, textures)
Moves a GameObject to a new position (local or world space)
Recompiles all scripts in the Unity project
Changes the parent of a GameObject in the hierarchy
Rotates a GameObject to a new rotation (local or world space, Euler angles or quaternion)
Runs tests using the Unity Test Runner
Saves the current active scene, with optional Save As to a new path
Scales a GameObject to a new local scale
Selects game objects in the Unity hierarchy by path or instance ID
Send a console log to Unity
Controls Unity play mode with actions: 'play' (start or unpause), 'pause' (toggle pause), 'stop' (exit play mode), 'step' (advance one frame)
Sets position, rotation, and scale of a GameObject in a single operation
Opens the Unity dashboard MCP App in VS Code (requires VS Code 1.109+)
Unloads a scene from the hierarchy (does not delete the scene asset)
Updates component fields on a GameObject or adds it to the GameObject if it does not contain the component
Updates a GameObject's core properties (name, tag, layer, active/static state), or creates the GameObject if it does not exist