Unity MCP Server
Provides tools for interacting with the Unity Editor, including managing GameObjects, scenes, assets, menus, play mode, console logs, and tests, as well as searching Unity documentation and local assets via RAG.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Unity MCP Server Create a new scene and add a Cube"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Unity MCP Server
A Model Context Protocol (MCP) server that lets an AI assistant drive the Unity Editor: scenes, GameObjects, assets, builds, profiling, play-mode testing and more. It is a Node/TypeScript server that talks over a local WebSocket to a C# plugin running inside the Editor. It also carries tooling for XREAL glasses development, which is being reworked for XREAL SDK 3.x (see XREAL support).
82 tools, 17 resources, 13 prompts. Not every tool is complete: 44 tools are real, 31 are partial,
and 7 XREAL tools return an explicit "not implemented" or "not available" error. Each tool's status is listed
below and, with notes, in .claude/CLAUDE.md. Where the code and this README disagree,
the code is right; please open an issue.
Status
Statuses come from docs/HANDLER_AUDIT.md, a read-through of every C# handler, updated for
the fixes made afterwards. They describe what the code does; most of it has not been re-tested in an Editor
since, so "real" does not mean bug-free.
Status | Meaning |
Real | Performs the Unity operation and reports truthfully. |
Partial | Works, but ignores some parameters, is narrower than its schema, or some actions are missing. |
Not available | Returns an error: the data exists only on a device or a running XR subsystem, not in the Editor. |
Not implemented | Returns an error and changes nothing. |
Since the 2026-10-10 honesty pass no tool returns simulated or invented data; a tool that cannot do something says so in its error text. Remaining cases where a setter skips a value but still reports success are called out in the Partial notes.
Related MCP server: Unity MCP Server
Security model
The bridge can run arbitrary C# in the Editor (execute_code) and read and write project files
(file_operations), so it is local-only by design.
The Unity plugin listens on 127.0.0.1 only (default port 8090). It is not reachable from the network. Setting
UNITY_HOSTto another machine will not connect.WebSocket handshakes that carry a browser
Origin(a URL, ornull) are rejected, so a web page cannot reach the bridge, including through DNS rebinding. Clients that send noOrigin, such as the Node server, connect.There is no token or per-client approval yet: any process on the same machine can connect. Do not forward or tunnel the port to untrusted hosts, and do not run it on a shared machine you do not trust.
The Editor plugin starts automatically in the interactive Editor and stays off in
-batchmodeunless started with-mcpServer(see Unity command-line flags).
Tools
Grouped by area and status. The XR tools were run in an Editor on 2026-10-11 but not yet on a device. Per-tool notes are in
.claude/CLAUDE.md.
Scenes and GameObjects (11)
Real:
create_scene,delete_scene,load_scene,get_gameobject,delete_gameobject,duplicate_gameobject,find_gameobjects,select_gameobject,editor_selection,update_componentPartial:
update_gameobject
Assets, packages and Hub (11)
Real:
manage_asset,add_package,add_external_dll,asset_store,file_operations,unity_hubPartial:
add_asset_to_scene,create_prefab,prefab,scriptable_object,asset_import
Editor, play mode and testing (13)
Real:
execute_menu_item,play_mode,send_console_log,get_console_logs,execute_code,run_tests,play_sequence,playtest,restart_serverPartial:
recompile_scripts,watch_console,editor_control,undo_redo
Build, project and diagnostics (5)
Partial:
build_pipeline,project_settings,script_management,profiler,debugger
Domain systems (11)
Real:
audio_mixer,physics2d,terrain,tilemapPartial:
animation,lighting,material_shader,navmesh,particle_system,physics,sprite
Knowledge (1)
Real:
search_unity_knowledge
XREAL: project setup (5)
Real:
install_xreal_sdk,setup_xreal_project,validate_xreal_setup,configure_xreal_settingsPartial:
configure_android_build
XREAL: device (3)
Real:
set_tracking_mode(edit-time initial tracking type)Partial:
get_camera_frameNot available:
get_xreal_device_info
XREAL: hand tracking (3)
Real:
enable_hand_tracking(refused for One / One Pro unless forced),create_hand_interactableNot available:
get_hand_state
XREAL: spatial mapping (5)
Real:
enable_plane_detectionPartial:
create_spatial_anchor,manage_spatial_anchorsNot available:
get_detected_planesNot implemented:
enable_meshing
XREAL: image tracking (3)
Not available:
get_tracked_imagesNot implemented:
add_tracking_image,configure_image_tracking
XREAL: display (1)
Real:
configure_xreal_display
XREAL: build and deploy (3)
Real:
get_build_statusPartial:
build_xreal_apk,get_connected_devices
XREAL: XR interaction (4)
Real:
setup_xr_interaction,create_xr_rig,add_xr_interactor,create_xr_ui
XREAL: performance (3)
Partial:
get_xr_performance_metrics,profile_xr_scene,capture_xr_screenshot
Resources (17)
Real:
unity://scenes_hierarchy,unity://gameobject/{idOrName},unity://logs/{logType},unity://packages,unity://editor_state,xreal://spatial_anchors,xreal://build_settingsPartial:
unity://menu-items(hard-coded fallback list),unity://assets(four folders, 50 entries each),unity://tests/{testMode},unity://profiler/{dataType},unity://build/{infoType},unity://settings/{category}Not available:
xreal://device_state,xreal://hand_tracking/{hand},xreal://detected_planes,xreal://tracked_images
Prompts (13)
Workflow guidance:
gameobject_handling_strategy,script_workflow,scene_setup,debugging_workflow,performance_optimization,ui_development,2d_game_development,world_building,audio_designXREAL (rewritten for SDK 3.x, 2026-10-11):
xreal_project_setup,hand_interaction_strategy,spatial_anchor_workflow,xreal_optimization_guide. They use only tools that exist and state what the One Pro lacks.
XREAL support (in progress)
The XREAL tools were first written against the legacy NRSDK, and many of them returned simulated or echoed results. Since 2026-10-10 each one either does real Editor-side work, reports what it skipped, or fails with an explicit error.
Direction: XREAL SDK 3.x (package com.xreal.xr, built on Unity XR Plug-in Management, XR Interaction Toolkit,
AR Foundation and XR Hands). NRSDK is legacy: install_xreal_sdk installs the SDK 3.x tarball, the old NRSDK import
tool is gone, and validate_xreal_setup only warns if NRSDK files are still in the project. The migration is in
progress; the remaining work is in ROADMAP.md.
Works today (run in a 6000.6.4f1 Editor on 2026-10-11, not yet on a device): install_xreal_sdk (validates and
adds the SDK tarball), setup_xreal_project and
validate_xreal_setup (XREAL's Getting Started player settings, XREAL loader assignment, XR Project Validation),
configure_xreal_settings, set_tracking_mode and configure_xreal_display (XREALSettings: tracking type, input
source, stereo mode, multi-resume; XR camera background), enable_hand_tracking (device-gated; XREAL's own hand
tracking setup menu), setup_xr_interaction, create_xr_rig, add_xr_interactor, create_xr_ui,
create_hand_interactable (through the XR Interaction Toolkit) and enable_plane_detection
(through AR Foundation). Partial: build_xreal_apk with get_build_status, get_connected_devices,
configure_android_build, create_spatial_anchor, profile_xr_scene.
Removed because the SDK has no such feature: calibrate_glasses, configure_hand_gestures,
configure_passthrough, configure_occlusion and the AR / VR / MR modes of the old set_render_mode.
Not there yet: spatial anchor persistence, image tracking, meshing, tracking-mode switching at runtime and every live read of device state (hands, planes, images, glasses status), which need a device or a running XR subsystem. Those tools return "not implemented" or "not available".
One Pro feature limits. XREAL's docs for SDK 3.1.0 list the One Series; they do not name the One Pro separately, so it is treated as part of that series.
Feature | XREAL One / One Pro | Air 2 Ultra |
6DoF head tracking | Only with the XREAL Eye accessory and updated firmware; otherwise 3DoF | Yes |
Hand tracking | No | Yes |
Plane detection | No | Yes |
Image tracking | No | Yes |
Spatial anchors | No | Yes |
Depth mesh | No | Yes |
RGB camera | Only with the Eye accessory | n/a |
The hand, plane, image, anchor and meshing tools therefore apply to an Air 2 Ultra, not a One Pro. Only
enable_hand_tracking is gated by device so far (it refuses One / One Pro unless force: true); the others do not
check, because the SDK itself does not.
Requirements and cautions
Unity: XREAL documents 2021.3, 2022.3 and 6000.0. This plugin ran live on 6000.5 and is compile-checked on 6000.5 and 6000.6, but XREAL SDK 3.x on 6000.6 is unverified.
Host: XREAL Beam Pro, or a Samsung Galaxy S24 or S25 with the ControlGlasses app. XREAL warns against upgrading development hosts to Android 16.
The SDK tarball (
com.xreal.xr.tar.gz) comes from developer.xreal.com/download behind XREAL's terms.install_xreal_sdkinstalls it from a local path you supply (tarballPath;setup_xreal_projectaccepts the same throughxrealSdkPath); this repo never downloads or bundles it.XREAL SDK 3.x has no simulator of its own. Use the XR Interaction Toolkit's XR Device Simulator (head pose and controllers only).
The first run of the XR tools in a real project is still ahead; the behaviour-test plan is in
docs/HANDLER_AUDIT.mdsection 11.
Sources: Getting Started, device compatibility, migration from NRSDK.
Relationship to Unity's official tooling
Unity now ships its own MCP entry point: unity mcp, part of the Unity CLI (beta). It starts an MCP server over
STDIO that exposes the commands of Unity's Pipeline package (com.unity.pipeline, experimental; Unity 6000.0+) as
tools, about 160 of them, free of charge. Unity has deprecated the MCP server inside the AI Assistant package
(com.unity.ai.assistant) in its favour
(Unity's migration page). These details
were checked on 2026-10-10 and will move while the CLI and package are in beta.
Treat it as complementary to this server:
Pipeline covers core Editor control well: scenes, GameObjects, components, prefabs, assets, tests, builds, baking, packages, console, screenshots and transactional batches. On Unity 6.0+ projects with Pipeline installed, prefer it for that; the overlapping tools here are not being extended (see ROADMAP.md).
This server covers what Pipeline does not: XREAL and XR tooling, terrain, tilemap, sprites, particles, physics queries, audio mixer, profiler captures, Asset Store, scripted play-mode drives (
play_sequence,playtest), script management, the debugger, knowledge search, and MCP resources and prompts (Pipeline serves tools only). It also runs on Unity versions before 6.0, which XREAL's docs still list.You can register both servers in one client. Together they advertise roughly 245 tools, so consider tool filtering.
Try it:
unity pipeline installin a project, thenunity mcp --project-path <path>.
Installation
You need the Node server and the Unity plugin.
npm install
npm run buildAdd the plugin to a Unity project, either by copying UnityPlugin/ to Packages/com.joelwehr.unity-mcp/ or by adding
this to Packages/manifest.json:
"com.joelwehr.unity-mcp": "file:../path/to/unity-mcp/UnityPlugin"The plugin depends on com.unity.ugui (declared in its package manifest). It starts its bridge when the Editor
opens; Tools > Unity MCP has Settings, Start, Stop and Restart. Step-by-step setup, including XREAL, is in
SETUP_GUIDE.md.
Configuration
The MCP client launches the Node server; the server connects to the bridge in the Editor. Nothing listens on 8090 except Unity.
Claude Code (project-level)
Create .mcp.json in your project (the one checked in here has a machine-specific path; edit it):
{
"mcpServers": {
"unity-mcp": {
"command": "node",
"args": ["C:/path/to/unity-mcp/build/index.js"],
"env": {
"UNITY_PORT": "8090",
"UNITY_HOST": "localhost",
"LOGGING": "true"
}
}
}
}Claude Desktop
Add to %APPDATA%/Claude/claude_desktop_config.json:
{
"mcpServers": {
"unity-mcp": {
"command": "node",
"args": ["C:/path/to/unity-mcp/build/index.js"],
"env": {
"UNITY_PORT": "8090"
}
}
}
}With RAG knowledge search
search_unity_knowledge needs an external RAG server; without these variables it replies that search is not configured.
{
"mcpServers": {
"unity-mcp": {
"command": "node",
"args": ["path/to/unity-mcp/build/index.js"],
"env": {
"UNITY_PORT": "8090",
"RAG_PYTHON_PATH": "python",
"RAG_SERVER_PATH": "path/to/unity-rag-server",
"RAG_DB_PATH": "path/to/unity-rag-server/data"
}
}
}
}Environment variables
Variable | Description | Default |
| Port of the Unity bridge (falls back to |
|
| Host the Node server connects to. Keep it local: the bridge listens on loopback only |
|
| Set to | off |
| Set to | off |
| Path to the Python executable for knowledge search | - |
| Path to the RAG server directory | - |
| Path to the RAG database | - |
Unity command-line flags
The plugin auto-starts its WebSocket server in the interactive Editor (unless Auto Start is
off in Tools > Unity MCP > Settings). In -batchmode it does not start, so headless builds
and test runs on other checkouts don't fight the Editor for the port.
Flag | Effect |
| Start the bridge anyway (required to use it from |
| Listen on this port instead of the configured one (e.g. |
If the port is already taken, the plugin logs one warning per Editor session and stays stopped.
Quick start: XREAL
Use these in order. Several steps install packages and trigger a script reload; the tools return pending: true and
you call them again afterwards. Details and caveats are in SETUP_GUIDE.md.
1. setup_xr_interaction { interactionMode: "Controller" }
2. setup_xreal_project { xrealSdkPath: "C:/path/to/com.xreal.xr.tar.gz" } // call again after the reload to assign the loader
3. validate_xreal_setup { autoFix: false }
4. create_xr_rig
5. create_hand_interactable { targetGameObject: "MyCube", interactionType: "Grab" }
6. build_xreal_apk { buildType: "Development" } // then poll get_build_statusinteractionMode: "Controller" avoids the XR Hands package, which only matters on an Air 2 Ultra.
Architecture
+------------------+ STDIO +------------------+ WebSocket 127.0.0.1:8090 +------------------+
| AI assistant | <-------> | Unity MCP | <--------------------------> | Unity Editor |
| (MCP client) | | server (Node) | | + C# plugin |
+------------------+ +------------------+ +--------+---------+
|
adb / USB (XREAL builds only) |
v
+--------------------------------------+
| Android host (Beam Pro, Galaxy S24/25)|
| + XREAL glasses |
+--------------------------------------+Development
npm run build # compile TypeScript to build/
npm run watch # compile in watch mode
npx tsc --noEmit # typecheck only (this is what CI runs, plus the build)
npm run inspector # run with the MCP Inspector
npm start # run the server (the MCP client normally does this)
npm run compile-check # compile the C# plugin offline, without launching Unitynpm run compile-check
scripts/compile-check.mjs compiles every asmdef under UnityPlugin/ with the .NET SDK's Roslyn compiler against
the reference assemblies of an installed Unity editor. It never starts Unity or contacts a running Editor.
npm run compile-check # newest 6000.6.x under C:/Program Files/Unity/Hub/Editor
npm run compile-check -- --editor 6000.5 --warnings
npm run compile-check -- --packages path/to/Project/Library/ScriptAssembliesNeeds Node 20+ and a .NET SDK on
PATH(dotnet --list-sdks).Package DLLs (uGUI, Input System, ...) are read from a project's
Library/ScriptAssemblies; point at one with--packagesorUNITY_MCP_PACKAGE_DLLS. XR package DLLs are normally absent, so the XR code (reflection only) is compiled but its member names are not checked.Prints
N errors, M warningsand the first errors. Exit code 0 = no errors, 1 = compile errors, 2 = environment problem. Other options:--unity-root,--plugin,--define,--max-errors,--json,--keep.It is not Unity's compile pipeline: no analyzers, no asmdef GUID resolution, and the
#ifbranches for editors you do not have installed (such as 2022.3) are not compiled.
File structure
unity-mcp/
├── src/
│ ├── index.ts # Server entry point, registers everything
│ ├── unity/mcpUnity.ts # WebSocket client for the Unity bridge
│ ├── tools/ # Tool implementations (52 core)
│ │ └── xreal/ # XREAL tools (30)
│ ├── resources/ # Resources (11 core)
│ │ └── xreal/ # XREAL resources (6)
│ ├── prompts/ # Prompts (9 core)
│ │ └── xreal/ # XREAL prompts (4)
│ └── utils/ # logger, errors, unityResult, progress, annotations, tarball
├── UnityPlugin/ # Unity package com.joelwehr.unity-mcp
│ ├── Editor/Core/ # WebSocket server, dispatch, settings
│ ├── Editor/Handlers/ # C# handlers (Xreal/ for XREAL and XR)
│ └── Runtime/ # Play-mode runner for play_sequence
├── scripts/compile-check.mjs # Offline C# compile check
├── docs/HANDLER_AUDIT.md # Handler audit and fix plan
├── build/ # Compiled JavaScript
├── .mcp.json # Sample MCP client configuration
└── package.jsonSummary
Category | Count |
Core tools | 52 |
XREAL tools | 30 |
Total tools | 82 |
Core resources | 11 |
XREAL resources | 6 |
Total resources | 17 |
Core prompts | 9 |
XREAL prompts | 4 |
Total prompts | 13 |
License
MIT
Available Tools
84 toolsadd_asset_to_sceneA
Adds an asset from the AssetDatabase to the Unity scene
Inputs: guid, parentId, position, assetPath, +1 more.
add_external_dllA
Downloads a raw DLL (or any binary asset) from a URL and installs it under the Unity project's Assets//. Use this for native plugins, NuGet DLLs, and CDN-hosted libraries that aren't published as Unity packages — e.g. zxing.unity.dll, Newtonsoft.Json.dll, custom .so/.aar bundles. The Node MCP server downloads the URL to a temp file and asks the Unity Editor to copy it into the Assets tree and refresh the AssetDatabase. Use add_package (source=github) for git-hosted UPM packages instead.
Inputs: url (required), destinationFolder (required), fileName, overwrite.
add_packageA
Adds packages into the Unity Package Manager
Inputs: source (required), path, branch, version, +2 more.
add_tracking_imageB
Adds an image to the image tracking database. The system will detect and track this image in the camera feed, returning its pose in 3D space.
Inputs: imageName (required), imagePath (required), physicalWidth (required), movingImage, +4 more.
add_xr_interactorA
Adds XR interaction components to a GameObject. Interactors enable selection and manipulation of XR Interactables via ray casting or direct touch.
Inputs: interactorType (required), targetGameObject (required), hand, lineType, +7 more.
animationB
Controls Unity Animation and Timeline systems. Actions:
play: Play animation on a GameObject
stop: Stop animation
pause: Pause animation
sample: Sample animation at specific time
get_clips: List animation clips on an Animator
get_parameters: Get Animator parameters
set_parameter: Set an Animator parameter (float, int, bool, trigger)
get_state_info: Get current Animator state info
crossfade: Crossfade to an animation state
get_timeline_state: Get Timeline playback state
set_timeline_time: Set Timeline playback position
play_timeline: Control Timeline playback
record_animation: Start/stop animation recording
create_clip: Create a new animation clip
Inputs: action (required), speed, clipName, objectId, +13 more.
asset_importA
Manages Unity asset import settings and reimport operations. Actions:
get_settings: Get import settings for an asset
set_settings: Modify import settings
reimport: Force reimport an asset
reimport_all: Reimport all assets (use with caution)
get_importer_type: Get the importer type for an asset
apply_preset: Apply an import preset to an asset Types: texture, model, audio, video, font, shader, plugin
Inputs: action (required), platform, assetPath, assetType, +4 more.
asset_storeA
Manages Unity Asset Store assets and Package Manager integration.
Actions:
list_my_assets: List all purchased/acquired assets from your Asset Store account
search_my_assets: Search your purchased assets by name
get_asset_details: Get details about a specific asset
download_asset: Download an asset to the local cache
import_asset: Import a downloaded asset into the project
download_and_import: Download and import in one step
get_download_progress: Check download progress
cancel_download: Cancel an ongoing download
list_cached_assets: List assets already downloaded to local cache
clear_cache: Clear the asset cache
refresh_my_assets: Refresh the list of purchased assets from server
search_store: Search the public Unity Asset Store catalog (no auth required)
Note: Most actions require Unity 2020.1+ and being logged into Unity Hub/Editor. search_store and list_cached_assets work without authentication. Assets must be purchased through the Asset Store website before downloading.
Inputs: action (required), page, sortBy, assetId, +6 more.
audio_mixerB
Manage Unity AudioMixers and AudioSources. Actions:
list: List all AudioMixer assets in the project
get_groups: Get mixer groups (channels)
get_snapshots: Get mixer snapshots
set_float: Set an exposed parameter value
get_float: Get an exposed parameter value
transition_snapshot: Transition to a named snapshot over duration
get_exposed_parameters: List all exposed parameters with current values
get_audio_sources: List all AudioSource components in the scene
Inputs: action (required), value, duration, mixerName, +3 more.
build_pipelineC
Comprehensive Unity build pipeline control. Actions:
build: Execute a build with specified settings
get_settings: Get current build settings
set_settings: Modify build settings
get_scenes: Get scenes in build settings
set_scenes: Set scenes in build settings
get_report: Get last build report (sizes, errors, warnings)
get_player_settings: Get platform-specific player settings
set_player_settings: Modify player settings
switch_platform: Switch active build target
get_platforms: List available build platforms
validate: Validate build configuration without building
Inputs: action (required), scenes, platform, buildPath, +3 more.
build_xreal_apkA
Queues an asynchronous Android APK build for XREAL One Pro and returns immediately with a jobId. Unity's BuildPipeline.BuildPlayer blocks the editor for minutes; this tool dispatches the build via EditorApplication.delayCall so the MCP request doesn't time out. Poll get_build_status with the returned jobId to follow progress and pick up the final BuildReport summary (output path, size, build time, errors, warnings).
Inputs: scenes, buildType, outputPath, strictMode, +8 more.
calibrate_glassesB
Triggers calibration procedures for XREAL glasses including IPD (interpupillary distance) adjustment, display brightness, and tracking recalibration.
Inputs: calibrationType (required), ipdValue, recenterPose, brightnessLevel.
capture_xr_screenshotARead-only
Captures a screenshot from the XR camera perspective. Can capture mono, stereo (side-by-side), or individual eye views. Useful for documentation and debugging.
Inputs: format, fileName, includeUI, jpgQuality, +7 more.
configure_android_buildA
Configures Android build settings optimized for XREAL One Pro on Samsung S24. Sets up ARM64 architecture, IL2CPP scripting backend, minimum API level, and other required settings for mobile XR.
Inputs: gpuSkinning, graphicsApis, architectures, minSdkVersion, +9 more.
configure_hand_gesturesA
Configures which hand gestures are recognized and their sensitivity. Gestures include pinch, grab, point, open palm, thumbs up, and more.
Inputs: grabThreshold, continuousMode, pinchThreshold, enabledGestures, +2 more.
configure_image_trackingC
Configures image tracking settings including how many images can be tracked simultaneously, tracking quality, and update frequency.
Inputs: enabled (required), autoFocus, trackingMode, lightEstimation, +2 more.
configure_occlusionC
Configures depth-based occlusion settings. Occlusion allows real-world objects to properly hide virtual objects that are behind them, creating realistic mixed reality.
Inputs: enabled (required), depthMode, smoothEdges, handOcclusion, +4 more.
configure_passthroughA
Configures the camera passthrough for mixed reality mode. Passthrough shows the real world through the glasses with virtual content overlaid.
Inputs: enabled (required), contrast, blendMode, brightness, +4 more.
create_hand_interactableA
Adds hand interaction components to a GameObject, making it respond to hand gestures like pinch-to-grab, poke, or hover. Sets up the necessary colliders and interaction scripts.
Inputs: interactionType (required), targetGameObject (required), grabType, pokeDepth, +7 more.
create_prefabB
Creates a prefab with optional MonoBehaviour script and serialized field values
Inputs: prefabName (required), fieldValues, componentName.
create_sceneB
Creates a new scene and saves it to the specified path
Inputs: sceneName (required), folderPath, makeActive, addToBuildSettings.
create_spatial_anchorA
Creates a spatial anchor at a specified position or on a detected plane. Spatial anchors persist across sessions and maintain their position in the real world.
Inputs: anchorName (required), metadata, position, rotation, +4 more.
create_xr_rigA
Creates an XR Origin (camera rig) configured for XREAL One Pro. Sets up the head-mounted display camera, hand tracking origins, and interaction components.
Inputs: rigName, position, prefabPath, cameraYOffset, +7 more.
create_xr_uiA
Creates a world-space UI canvas configured for XR interaction. Sets up proper scaling, interaction raycasting, and visual settings for comfortable viewing in mixed reality.
Inputs: width, height, position, rotation, +9 more.
debuggerB
Unity debugging utilities for inspection and troubleshooting. Actions:
evaluate_expression: Evaluate a C# expression in the current context
get_stack_trace: Get current stack trace (when paused or from last exception)
list_breakpoints: List all breakpoints (requires external debugger)
dump_object: Get detailed dump of an object's fields and properties
invoke_method: Invoke a method on a GameObject or component
get_static_field: Get value of a static field from a type
set_static_field: Set value of a static field
call_static_method: Call a static method on a type
debug_log: Log structured debug information
get_component_values: Get all serialized values from a component
Inputs: action (required), maxDepth, objectId, typeName, +9 more.
delete_gameobjectADestructive
Deletes a GameObject from the scene by path, name, or instance ID
Inputs: instanceId, objectName, objectPath.
delete_sceneADestructive
Deletes a scene by path or name and removes it from Build Settings
Inputs: sceneName, scenePath, folderPath.
duplicate_gameobjectB
Duplicates a GameObject in the scene, optionally with a new name
Inputs: newName, instanceId, objectName, objectPath.
editor_controlB
Controls Unity Editor windows and UI elements. Actions:
focus_window: Focus a specific editor window (Inspector, Hierarchy, Project, Scene, Game, Console, Profiler)
get_windows: List all open editor windows
open_window: Open an editor window
close_window: Close an editor window
inspector_lock: Lock/unlock the Inspector
inspector_mode: Set Inspector to Normal or Debug mode
ping_asset: Ping/highlight an asset in the Project window
frame_selected: Frame selected object in Scene view
set_scene_view: Configure Scene view settings (2D, orthographic, etc.)
get_editor_state: Get current editor state (play mode, paused, compiling, etc.)
refresh: Force refresh of Project window and AssetDatabase
clear_console: Clear the Console window
take_screenshot: Capture editor window screenshot
Inputs: action (required), locked, assetPath, debugMode, +4 more.
editor_selectionBIdempotent
Gets or sets the current Unity Editor selection (GameObjects, assets, etc.)
Inputs: path, paths, action, instanceId, +1 more.
enable_hand_trackingA
Enables or disables hand tracking on XREAL glasses. When enabled, the system tracks hand poses, joint positions, and recognizes gestures. Required for hand-based interactions.
Inputs: enabled (required), trackedHands, trackingMode, gestureRecognition, +2 more.
enable_meshingA
Enables or disables spatial meshing to generate 3D mesh geometry of the real environment. Used for occlusion, physics collisions, and spatial understanding.
Inputs: enabled (required), updateRate, volumeSize, meshDensity, +5 more.
enable_plane_detectionA
Enables or disables plane detection for spatial mapping. Detects horizontal surfaces (floors, tables) and vertical surfaces (walls) in the real environment.
Inputs: enabled (required), maxPlanes, planeColor, planeTypes, +5 more.
execute_codeADestructive
Execute arbitrary C# code in the Unity Editor context. This is the most powerful tool — it can do anything the Unity Editor API allows.
The code runs with full access to UnityEngine, UnityEditor, System, and all project assemblies.
For simple expressions, just provide the expression (e.g., "Selection.activeGameObject.name"). For multi-statement code, write full C# statements. A return statement determines the output. For void operations, the code runs and any Debug.Log output is captured.
Pre-imported namespaces: System, System.Collections.Generic, System.Linq, System.Reflection, System.IO, UnityEngine, UnityEditor, UnityEditor.SceneManagement, UnityEngine.SceneManagement, UnityEngine.UI
Examples:
"PlayerSettings.productName" → returns product name
"GameObject.FindObjectsOfType().Length" → returns camera count
"var go = new GameObject("MyObject"); return go.name;" → creates object, returns name
"Debug.Log("Hello"); return Selection.objects.Length;" → logs + returns count
Inputs: code (required).
file_operationsADestructive
Read, write, list, and search files within the Unity project.
Actions:
read: Read the contents of a file (scripts, shaders, configs, etc.)
write: Write/create a file in the project (auto-imports to AssetDatabase)
list: List files in a directory with optional pattern filtering
exists: Check if a file or directory exists
search: Search file contents for a text query (grep-like)
get_script_classes: Analyze a C# script to get its classes, methods, and fields
Paths can be absolute or relative to the project root. Examples:
"Assets/Scripts/MyScript.cs" (relative)
"Assets/Shaders/" (directory)
"ProjectSettings/ProjectSettings.asset" (project settings)
Security: All paths must be within the Unity project directory.
Inputs: action (required), path, query, content, +3 more.
find_gameobjectsARead-onlyIdempotent
Finds GameObjects in the scene by name pattern, tag, layer, or component type
Inputs: tag, layer, maxResults, namePattern, +2 more. Returns: message, success, gameObjects
get_build_statusARead-only
Returns the current status of an asynchronous build started by build_xreal_apk. Provide the jobId returned from that tool. State transitions: Queued -> Building -> Succeeded | Failed. When state is Succeeded the response includes outputPath, fileSizeMb, buildSeconds, and (if runAfterBuild was set) a deployment summary. When state is Failed the response includes an errors array. Omit jobId to get a list of every known build job in this editor session.
Inputs: jobId.
get_camera_frameARead-only
Captures a frame from the XREAL RGB camera for computer vision or AR development. Returns image data or saves to a file. Useful for debugging image tracking and mixed reality features.
Inputs: format, filePath, cameraType, resolution, +2 more.
get_connected_devicesARead-only
Lists all Android devices connected via ADB. Shows device IDs, models, Android versions, and connection status. Useful for verifying device setup before deployment.
Inputs: refreshDevices, includeEmulators, checkXrealSupport, includeUnauthorized.
get_console_logsARead-onlyIdempotent
Retrieves logs from the Unity console with pagination support to avoid token limits
Inputs: limit, offset, logType, includeStackTrace. Returns: logs, limit, total, offset, +2 more
get_detected_planesARead-only
Gets information about all currently detected planes in the environment. Returns plane positions, orientations, boundaries, and classifications.
Inputs: minArea, planeType, includePose, classification, +2 more.
get_gameobjectARead-onlyIdempotent
Retrieves detailed information about a specific GameObject by instance ID, name, or hierarchical path (e.g., 'Parent/Child/MyObject'). Returns all component properties including Transform position, rotation, scale, and more.
Inputs: idOrName (required). Returns: message, success
get_hand_stateBRead-only
Gets the current state of tracked hands including joint positions, detected gestures, pinch strength, and tracking confidence. Returns detailed hand pose data.
Inputs: hand, coordinateSpace, includeGestures, includeVelocity, +2 more.
get_tracked_imagesARead-only
Gets the current state of tracked images including which images are detected, their poses, and tracking quality.
Inputs: imageFilter, includePose, includeSize, trackingState, +1 more.
get_xreal_device_infoARead-only
Gets information about the connected XREAL device including model, connection status, tracking state, battery level, and supported features. Works in both Editor simulation and on-device.
Inputs: includeBatteryInfo, includeDisplayInfo, includeCapabilities, includeTrackingState.
get_xr_performance_metricsARead-only
Gets real-time XR performance metrics including frame rate, frame times, GPU/CPU usage, thermal state, and memory usage. Essential for optimizing mobile XR experiences.
Inputs: averageOverFrames, includeCpuMetrics, includeGpuMetrics, includeFrameMetrics, +3 more.
import_nrsdkA
Imports the NRSDK (XREAL SDK) into the Unity project. Can import from a local unitypackage file or download a specific version. Configures initial SDK settings after import.
Inputs: source (required), url, path, version, +3 more.
lightingC
Controls Unity lighting and rendering environment. Actions:
get_settings: Get current lighting settings
set_settings: Modify lighting settings
bake_lighting: Start lightmap baking
cancel_bake: Cancel ongoing bake
get_bake_status: Get baking progress
clear_baked_data: Clear baked lighting data
get_light_probes: Get light probe data
update_light_probes: Refresh light probes
set_ambient: Set ambient lighting
set_fog: Configure fog settings
set_skybox: Set skybox material
get_reflection_probes: Get reflection probe data
render_reflection_probes: Re-render reflection probes
Inputs: action (required), skyboxPath, bakeOptions, fogSettings, +3 more.
load_sceneBIdempotent
Loads a scene by path or name. Supports additive loading (default: false)
Inputs: additive, sceneName, scenePath, folderPath.
manage_assetBDestructive
Manages assets in the project: move, delete, rename, copy, create_folder, get_path
Inputs: action (required), guid, newName, destPath, +5 more.
manage_spatial_anchorsA
Manages spatial anchors: load from persistence, save current anchors, delete anchors, or query anchor information. Essential for persistent MR experiences.
Inputs: action (required), filter, anchorId, anchorName, +2 more.
material_shaderC
Manages Unity materials and shaders. Actions:
get_material: Get material properties from a renderer
set_material_property: Set a material property value
create_material: Create a new material
assign_material: Assign material to a renderer
get_shader_properties: List all properties of a shader
get_available_shaders: List available shaders
set_shader: Change shader on a material
copy_material: Copy material properties
get_global_shader_property: Get global shader property
set_global_shader_property: Set global shader property
get_keywords: Get enabled shader keywords
enable_keyword: Enable a shader keyword
disable_keyword: Disable a shader keyword
Inputs: action (required), keyword, objectId, colorValue, +14 more.
particle_systemA
Manage Unity ParticleSystems in detail. Actions:
create: Create a new ParticleSystem GameObject
get_info: Get full particle system state (main, emission, shape modules)
set_main: Configure main module (duration, looping, lifetime, speed, size, gravity, etc.)
set_emission: Configure emission (rate over time/distance)
set_shape: Configure shape module (type, radius, angle, arc)
set_renderer: Configure renderer (render mode, material, sorting order)
play/stop/pause/restart: Playback control
list: List all ParticleSystems in scene
set_color_over_lifetime: Set start/end color gradient
set_size_over_lifetime: Set start/end size curve
set_velocity_over_lifetime: Set velocity min/max per axis
get_modules: Check which modules are enabled
Inputs: action (required), x, y, z, +33 more.
physicsB
Unity Physics system control and queries. Actions:
raycast: Perform a raycast and return hit info
raycast_all: Raycast returning all hits
spherecast: Sphere-based raycast
boxcast: Box-based raycast
overlap_sphere: Find colliders in a sphere
overlap_box: Find colliders in a box
simulate: Step physics simulation manually
get_contacts: Get contact points between colliders
set_gravity: Set physics gravity
get_layer_collision: Get layer collision matrix
set_layer_collision: Set layer collision matrix
add_force: Add force to a Rigidbody
add_torque: Add torque to a Rigidbody
set_velocity: Set Rigidbody velocity
get_rigidbody_state: Get Rigidbody physics state
Inputs: action (required), force, layer1, layer2, +17 more.
physics2dA
Manage Unity 2D Physics: rigidbodies, colliders, raycasts, joints, effectors. Actions:
get_settings: Get Physics2D global settings (gravity, iterations, etc.)
set_settings: Modify Physics2D settings
raycast: Cast a 2D ray and return hit info
overlap_circle: Find all colliders within a circle
overlap_box: Find all colliders within a box
get_rigidbodies: List all Rigidbody2D components in scene
set_rigidbody: Add/configure Rigidbody2D on a GameObject
add_force: Apply force to a Rigidbody2D
get_colliders: List all Collider2D components in scene
add_collider: Add a 2D collider to a GameObject
get_joints: List all Joint2D components in scene
get_effectors: List all Effector2D components in scene
get_layers: Get 2D collision layer matrix
set_layer_collision: Enable/disable collision between two layers
Inputs: action (required), x, y, dirX, +31 more.
play_modeA
Controls Unity Editor play mode: enter, exit, pause, unpause, step, or get current state
Inputs: action (required).
playtestB
Autonomous playtesting: observe game state, simulate taps, click UI elements, capture screenshots, and interact with game objects during Unity play mode
Inputs: action (required), x, y, args, +19 more.
prefabB
Advanced Unity prefab operations. Actions:
get_info: Get prefab status (instance/asset type, variant, overrides)
create_variant: Create a prefab variant from a base prefab
get_overrides: List property modifications, added/removed components
apply_overrides: Apply all instance overrides back to the prefab asset
revert_overrides: Revert all instance overrides
unpack: Unpack a prefab instance (outermost or completely)
open: Open prefab in prefab editing mode
close: Close prefab editing mode, return to main stage
instantiate: Instantiate a prefab into the scene with optional position/parent
Inputs: action (required), objectId, position, assetPath, +4 more.
profilerCRead-only
Controls Unity's Profiler for performance analysis. Actions:
start: Begin profiling session
stop: End profiling session
get_frame_data: Get detailed frame timing data
get_memory_snapshot: Capture memory usage snapshot
get_render_stats: Get rendering statistics (draw calls, triangles, batches)
get_cpu_usage: Get CPU time breakdown by area
get_gc_allocs: Get garbage collection allocations
save_report: Save profiler data to file
clear: Clear profiler data
Inputs: action (required), sortBy, minTime, savePath, +6 more.
profile_xr_sceneBRead-only
Analyzes the current scene for XR performance issues. Checks draw calls, triangle counts, texture memory, shader complexity, and provides optimization recommendations.
Inputs: analyzeAssets, analyzeMemory, analyzePhysics, analyzeScripts, +4 more.
project_settingsA
Manages Unity Project Settings including PlayerSettings, QualitySettings, GraphicsSettings, PhysicsSettings, and more. Actions: get (read settings), set (modify settings), list_categories (show available categories). Categories: player, quality, graphics, physics, time, audio, editor, input, tags_layers, preset_manager
Inputs: action (required), filter, category, platform, +2 more.
recompile_scriptsB
Recompiles all scripts in the Unity project.
Inputs: logsLimit, returnWithLogs.
restart_serverA
Rebuild TypeScript and restart the MCP server to pick up code changes. Use after modifying TS tools, C# handlers, or prompts. The server will exit and be auto-restarted by the host (Claude Code).
Inputs: rebuild.
run_testsC
Runs Unity's Test Runner tests
Inputs: testMode, testFilter, returnWithLogs, returnOnlyFailures. Returns: message, results, success, failCount, +3 more
scriptable_objectB
Manage Unity ScriptableObjects. Actions:
create: Create a new ScriptableObject asset
get_properties: Inspect all serialized properties
set_property: Set a serialized property value
list: List ScriptableObjects in a folder
find_by_type: Find all assets of a specific SO type
duplicate: Duplicate a ScriptableObject asset
Inputs: action (required), folder, destPath, typeName, +3 more.
script_managementB
Manages Unity scripting configuration including:
Scripting Define Symbols (#define directives)
Assembly Definitions (asmdef files)
Script Execution Order
Script compilation state Actions: get_defines, set_defines, add_define, remove_define, get_assemblies, create_assembly, get_execution_order, set_execution_order, get_compilation_state
Inputs: action (required), define, defines, platform, +4 more.
search_unity_knowledgeARead-onlyIdempotent
Search the Unity knowledge base for relevant documentation and assets.
Args: query: The search query string to find relevant Unity knowledge. filter_source: Optional filter to limit results by source type. Valid values: 'api', 'manual', 'local_asset', 'reach_ui'. If not provided, searches all sources.
Returns: Formatted string containing relevant search results with source info.
Inputs: query (required), filter_source.
select_gameobjectAIdempotent
Sets the selected GameObject in the Unity editor by path, name or instance ID
Inputs: instanceId, objectName, objectPath.
send_console_logB
Sends console log messages to the Unity console
Inputs: message (required), type.
set_render_modeB
Sets the rendering mode for the XREAL experience. VR mode renders only virtual content, AR mode overlays on passthrough, MR mode enables full mixed reality with occlusion.
Inputs: mode (required), occlusionMode, backgroundType, backgroundColor, +2 more.
set_tracking_modeA
Sets the tracking mode for the XREAL glasses. 0DoF provides rotation only, 3DoF adds positional tracking relative to start, and 6DoF provides full positional and rotational tracking.
Inputs: mode (required), trackingOrigin, recenterOnSwitch.
setup_xreal_projectA
Sets up a Unity project for XREAL One Pro development. Configures Android build target, XR Plugin Management, and imports NRSDK. This is the first step for any new XREAL mixed reality project.
Inputs: companyName, packageName, projectName, nrsdkVersion, +4 more.
setup_xr_interactionB
Sets up the XR Interaction Toolkit for XREAL development. Configures interaction systems, input actions, and default interactors for hand-based or controller-based interaction.
Inputs: installXRIT, xritVersion, enableSnapTurn, hapticFeedback, +5 more.
spriteA
Manage Unity Sprites and SpriteAtlases. Actions:
get_info: Get sprite import settings and sub-sprites
list: List sprite assets in a folder
set_import_settings: Configure texture type, pixels per unit, filter, compression
slice: Slice a sprite sheet into multiple sprites (grid mode)
get_sprite_renderers: List all SpriteRenderer components in scene
set_sprite: Set the sprite on a SpriteRenderer
get_atlases: List SpriteAtlas assets
create_atlas: Create a new SpriteAtlas
add_to_atlas: Add sprites/folders to a SpriteAtlas
pack_atlas: Pack a SpriteAtlas for the active build target
Inputs: action (required), a, b, g, +24 more.
terrainA
Manage Unity Terrains. Actions:
create: Create a new terrain with specified size and resolution
get_info: Get terrain details (size, resolution, layers, trees, details)
set_height: Set terrain height at a world position with brush radius
get_height: Sample terrain height at a world position
flatten: Flatten entire terrain to a uniform height
set_detail: Paint detail/grass density at a position
paint_texture: Paint a terrain layer/texture at a position
add_tree: Add a tree instance at a normalized (0-1) position
get_layers: List all terrain layers (textures)
add_layer: Add a new terrain layer from a texture asset
set_settings: Modify terrain rendering settings
list: List all terrains in the scene
Inputs: action (required), x, z, layer, +22 more.
tilemapA
Manage Unity Tilemaps for 2D level design. Actions:
create: Create a new Tilemap under a Grid (creates Grid if needed)
get_info: Get tilemap details (bounds, tile count, orientation)
set_tile: Place a tile at a cell position
erase_tile: Remove a tile at a cell position
fill_area: Fill a rectangular area with a tile
clear: Remove all tiles from a tilemap
get_tile: Inspect what tile is at a cell position
get_bounds: Get the used cell bounds
list: List all tilemaps in the scene
list_tiles: List TileBase assets in a folder
create_tile: Create a Tile asset from a sprite
set_color: Set the color tint of a tile at a position
compress_bounds: Compress tilemap bounds to remove empty space
Inputs: action (required), a, b, g, +16 more.
undo_redoA
Controls Unity's Undo/Redo system. Actions:
undo: Perform undo operation
redo: Perform redo operation
get_history: Get undo/redo history stack
clear: Clear all undo history
begin_group: Begin an undo group (combine multiple operations)
end_group: End an undo group
set_group_name: Set name for current undo group
record_object: Record object state for undo
flush: Flush all recorded operations
Inputs: action (required), objectId, groupName, objectPath, +1 more.
unity_hubA
Controls Unity Hub to create projects, manage installations, and open projects. This tool works INDEPENDENTLY of the Unity Editor connection. Editor installs use the Unity Hub CLI; project creation and template listing use the installed Editor and its bundled templates directly (the Hub CLI has no create/templates subcommands).
Actions:
create_project: Create a new Unity project
open_project: Open an existing project in Unity Editor
list_projects: List recent projects from Unity Hub
list_installations: List installed Unity Editor versions
install_editor: Install a Unity Editor version
add_module: Add a module to an installed editor (Android, iOS, WebGL, etc.)
list_templates: List available project templates
get_hub_path: Get the Unity Hub installation path
Note: Unity Hub must be installed. Default paths:
Windows: C:\Program Files\Unity Hub\Unity Hub.exe
macOS: /Applications/Unity Hub.app/Contents/MacOS/Unity Hub
Linux: ~/Unity Hub/UnityHub.AppImage
Inputs: action (required), hubPath, modules, template, +4 more.
update_componentA
Updates component fields on a GameObject or adds it to the GameObject if it does not contain the component
Inputs: componentName (required), instanceId, objectPath, componentData.
update_gameobjectA
Updates properties of a GameObject in the Unity scene by its instance ID or path. If the GameObject does not exist at the specified path, it will be created.
Inputs: gameObjectData (required), instanceId, objectPath.
validate_xreal_setupARead-only
Validates the Unity project configuration for XREAL development. Checks NRSDK installation, Android build settings, XR Plugin Management, required permissions, and reports any issues that need to be fixed.
Inputs: autoFix, checkNrsdk, checkSceneSetup, checkPermissions, +2 more.
watch_consoleARead-only
Monitors the Unity console for new logs with filtering and waiting capabilities. Perfect for recursive iteration - wait for specific messages, errors, or compilation results. Actions:
wait_for_message: Block until a message matching pattern appears (with timeout)
wait_for_error: Block until an error occurs (with timeout)
wait_for_silence: Block until no new logs for specified duration
wait_for_compilation: Block until scripts finish compiling
wait_for_play_mode: Block until play mode state changes
get_new_logs: Get logs since last check (uses internal cursor)
reset_cursor: Reset the log cursor to current position
Inputs: action (required), logType, maxLogs, pattern, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 84 tools
With 84 tools, many have overlapping purposes, such as multiple tools for adding objects (add_asset_to_scene, create_prefab, instantiate) and multiple ways to execute code (execute_code, call_static_method). Descriptions are detailed but the high number of tools with similar functions causes confusion.
Tool names follow inconsistent patterns: some use verb_noun (add_asset_to_scene), others are simple nouns (animation, debugger), and some are verb-only (execute_code). Mixing of patterns and lack of a predictable scheme reduces coherence.
84 tools is excessively high for a single MCP server. While the server covers a broad Unity domain, the count makes navigation difficult and suggests many tools could be combined or eliminated. A more focused scope would improve usability.
The server covers many Unity areas (XR, animation, physics, terrain, etc.), but has notable gaps like missing standard UI tools (non-XR canvas, buttons) and lack of direct GameObject hierarchy management. It is comprehensive in XR but incomplete for general Unity workflows.
Maintenance
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
Generate 3D models, worlds, PBR materials, and coordinated asset packs from AI agents.
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to interact with Unity projects through multimodal vision, code analysis, asset management, and scene manipulation. Supports real-time Unity editor control, project search, script creation, and visual debugging through screenshots.32MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to interact with Unity Editor projects through 68+ tools for manipulating scenes, GameObjects, components, and assets, plus live access to console logs, hierarchies, and test results.10 npm9MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Unity Editor, managing scenes, game objects, animations, materials, scripts, and more via natural language commands.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to control and automate the Unity Editor, allowing them to build games and scenes from natural language commands.1MIT