VMUnityMCP
Allows interaction with the Unity Editor, providing structured, queue-safe tools for scenes, assets, UI Toolkit, packages, builds, tests, project-defined workflows, and Editor diagnostics.
Click on "Install 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., "@VMUnityMCPlist all playmode tests"
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.
VM Unity MCP
VM Unity MCP is an independently maintained Unity Editor MCP bridge published by VM233. It provides structured, queue-safe tools for scenes, assets, UI Toolkit, packages, builds, tests, project-defined workflows, and Editor diagnostics.
This project was originally derived from AnkleBreaker Studio's Unity MCP Plugin and retains its full license and attribution requirements. Powered by AnkleBreaker MCP. VM Unity MCP now develops and releases from a standalone repository rather than a GitHub fork.
Related original projects:
Install
In Unity Package Manager, choose Add package from git URL... and enter:
https://github.com/VM233/VMUnityMCP.gitFor a reproducible project dependency, pin a specific commit:
https://github.com/VM233/VMUnityMCP.git#<commit-hash>The bridge runs inside the Unity Editor on 127.0.0.1, usually port 7890. Verify it with:
http://127.0.0.1:7890/api/pingRelated MCP server: UniMCP
Capabilities
Area | MCP tool name | HTTP route | Purpose |
Fallback entrypoint |
|
| Fallback route for commands that do not have a concrete tool yet. Prefer route-specific |
MCP diagnostics |
|
| Inspect bridge state, queue state, sessions, process memory, recent actions, and slow requests. |
MCP diagnostics |
|
| Enable or disable bridge auto-start for the current Unity Editor instance. |
Editor stability |
|
| Wait for compilation, package refresh, domain reload, and asset import to settle before issuing the next command. |
Testing |
|
| List discoverable EditMode or PlayMode tests with filters. |
Testing |
|
| Start a Unity Test Runner job. |
Testing |
|
| Poll test progress and detailed results. |
Package testing |
|
| Temporarily enable Git package tests, run them across domain reloads, and restore the package manifest exactly. |
Package testing |
|
| Poll the persistent package test workflow and its final test result. |
Localization |
|
| Prevalidate and upsert one or more String, Smart String, or Asset Table entries with |
Multi-editor safety |
|
| Return the current Editor MCP instance identity, including project path and port. |
Multi-editor safety |
|
| List registered Editor MCP instances across open Unity projects. |
Multi-editor safety |
|
| Resolve exactly one Editor MCP instance by project path, project name, or port. |
Multi-editor safety |
|
| Verify that a request reached the expected Unity project. |
Prefab asset editing |
|
| Add a component after waiting for a newly compiled script type to become available; returns prefab YAML diff by default. |
Prefab asset editing |
|
| Ensure one component exists and atomically configure serialized properties and ObjectReferences in one prefab save. |
Prefab asset editing |
|
| Create a child GameObject inside a prefab asset. |
Prefab asset editing |
|
| Apply ordered prefab edits in one load/save transaction with |
Prefab asset editing |
|
| Instantiate one prefab asset as a child inside another prefab asset. |
Prefab asset editing |
|
| Move or reorder a GameObject inside a prefab asset without opening Prefab Mode manually. |
Prefab asset editing |
|
| Atomically move a component between GameObjects while preserving its serialized data and remapping references to the moved component. |
Prefab asset editing |
|
| Remove a component from a GameObject inside a prefab asset. |
Prefab asset editing |
|
| Remove a child GameObject from inside a prefab asset. |
Prefab asset editing |
|
| Set a serialized property on a component inside a prefab asset. |
Prefab asset editing |
|
| Set an ObjectReference property on a component inside a prefab asset. |
Prefab asset search |
|
| Find prefab children by name/path, component type, and serialized property value. |
Prefab asset search |
|
| Read a prefab asset hierarchy directly from disk. |
Prefab asset search |
|
| Read serialized component properties inside a prefab asset. |
Scene editing |
|
| Instantiate a prefab asset into the currently open scene. |
Safe assets |
|
| Start a reload-safe AssetDatabase refresh and return a refresh job ID. |
Safe assets |
|
| Poll a reload-safe AssetDatabase refresh through compilation or domain reload. |
Safe assets |
|
| Preflight and import external assets with shared TextureImporter defaults, decoded-pixel/file-byte deduplication, frame-batched execution, per-item results, and rollback. |
Safe assets |
|
| Start a reload-safe, non-interactive |
Safe assets |
|
| Rename an asset through |
Safe assets |
|
| Preflight and move one or more assets, preserving |
Scene references |
|
| Assign one or more ObjectReference properties with |
Serialization |
|
| Read serialized properties from a scene object, component, or asset. |
Serialization |
|
| Set one serialized property on a scene object, component, or asset. |
Console inspection |
|
| Filter recent console entries by time, log type, message, source stack frame, full stack text, or only entries after the last Play transition. |
Compilation inspection |
|
| Return tracked Unity compilation errors and warnings, always including a separate deprecated-warning summary even when filtering for errors. |
Animator editing |
|
| Read full Animator transition details, including conditions, exit time, duration, offset, and interruption settings. |
Animator editing |
|
| Modify an existing Animator state, including motion, speed, tag, position, write defaults, and default state. |
Animator editing |
|
| Modify an existing transition and add, update, remove, or replace transition conditions. |
Animator editing |
|
| Create directed pairwise transitions between a list of Animator states. |
UI Toolkit assets |
|
| Inspect UXML/USS assets for VisualElement names, type matches, unconditional class defaults, contextual selectors, and pseudo-state rules. |
UI Toolkit static audit |
|
| Find selectors that serve one authored element without a reusable, pseudo-state, generated-child, or runtime-class contract, plus declarations that repeat the same winning value from the loaded PanelSettings theme or another loaded stylesheet. |
UI Toolkit static audit |
|
| Find unconsumed authored element names, fully fixed flex partitions that should leave one flexible remainder, layout-only manually centered containers, removable single-child centering wrappers, visually inert centered-label stretching or growth, repeated inline layout variants, and inline declarations already supplied by a loaded USS default, including implicit UI Toolkit classes. |
UI Toolkit runtime |
|
| List runtime UIDocuments and their root visual element metadata. |
UI Toolkit runtime |
|
| Read a UIDocument visual tree, including optional style and bounds data. |
UI Toolkit runtime |
|
| Query runtime VisualElements by tree path, VisualElementPath name list, name, class, type, or text. |
UI Toolkit runtime |
|
| Read inline style, resolved style, bounds, and background asset metadata for a runtime element. |
UI Toolkit runtime |
|
| Repaint a runtime UIDocument or one selected VisualElement. |
UI Toolkit runtime |
|
| Refresh UI Toolkit assets, repaint panels, and return after stable editor frames. |
UI Toolkit runtime |
|
| Assert runtime layout constraints such as no-gap/no-overlap edge touching, edge alignment, center alignment, containment, and expected size. |
UI Toolkit visual QA |
|
| Locate an Editor or runtime UI Toolkit element and return bounds, crop rect, and context for later screenshots or pixel checks. |
UI Toolkit visual QA |
|
| Capture a UI Toolkit element by locating it in an Editor window or runtime UIDocument and cropping its containing window screenshot. |
UI Toolkit visual QA |
|
| Capture a UI Toolkit element and compare the crop with a reference image, optionally writing a diff image. |
UI Toolkit visual QA |
|
| Inspect generated UI Toolkit children such as arrows, checkmarks, scrollers, TabView internals, and unnamed |
UI Toolkit visual QA |
|
| Audit target elements and descendants for resolved background assets, highlighted-state misuse, and missing or forbidden assets. |
UI Builder |
|
| Open a UXML asset, enable Match Game View when visible content overflows the canvas, wait for a stable preview, and optionally capture the UI Builder window. |
Screenshot utilities |
|
| Crop a screenshot or image file to a PNG for focused visual inspection. |
Screenshot utilities |
|
| Capture the Scene View once and return a file, base64 PNG, or both. |
Graphics utilities |
|
| Render Unity's preview for a prefab or other supported asset as a base64 PNG. |
Graphics utilities |
|
| Inspect a PNG or texture asset and return visible alpha pixel bounds plus transparent margins. |
Graphics utilities |
|
| Measure a gap or overlap between two rectangles along selected edges. |
Graphics utilities |
|
| Draw rectangle borders onto screenshots or images for visual verification reports. |
Graphics utilities |
|
| Compare two screenshots or crop regions, return difference bounds and samples, and optionally write a highlighted diff image. |
Sprite pipeline |
|
| Inspect a sliced sprite sheet and return texture and sprite metadata. |
Sprite pipeline |
|
| Replace a sprite sheet PNG and slice it into numbered sprites while preserving sprite IDs by name. |
Sprite pipeline |
|
| Slice an existing sprite sheet into numbered sprites. |
Sprite pipeline |
|
| Rebuild a SpriteRenderer sprite animation curve from a sheet's sprites. |
Sprite pipeline |
|
| Replace a sheet, slice it, and update an AnimationClip in one call. |
Texture pipeline |
|
| Apply high-level TextureImporter/Sprite settings, including pixel sprite preset, PPU, pivot, border, and reference settings. |
Texture pipeline |
|
| Inspect texture dimensions and TextureImporter settings, including sprite PPU, pivot, and border. |
Texture pipeline |
|
| Configure TextureImporter type and settings, including Sprite and NormalMap, then reimport once. |
Texture pipeline |
|
| Audit project image assets for identical decoded pixels or file bytes across one or more folders. |
Texture pipeline |
|
| Import an image from a URL or local file into Assets, dedupe by hash, and apply sprite import settings. |
Texture pipeline |
|
| Check UI pixel-art image import settings, including pixel sprite defaults plus optional expected dimensions, border, and max texture size. |
Player Build |
|
| Start a persistent Player Build job and optionally run the built player. |
Player Build |
|
| Poll the Player Build job for its final BuildReport and optional run result. |
Package management |
|
| Update a Git package through a deferred route; same-commit updates skip Unity Package Manager resolve by default. |
Package management |
|
| Add a registry, Git, local, or tarball package through Unity Package Manager. |
Package management |
|
| Remove an installed package without blocking the Editor main thread. |
Package management |
|
| Search the package registry with bounded pagination. |
Asset workspace |
|
| Ensure an Assets folder hierarchy, with dry-run support. |
Asset workspace |
|
| Copy one or more Unity assets with overwrite snapshots and rollback. |
Asset workspace |
|
| Read paginated incoming and outgoing asset references. |
Asset workspace |
|
| Apply folder, copy, move, delete, and serialized edits as a rollback-capable transaction. |
UI Toolkit authoring |
|
| Edit UXML elements, attributes, classes, hierarchy, and text structurally. |
UI Toolkit authoring |
|
| Upsert/remove USS selectors and declarations structurally. |
UI Toolkit authoring |
|
| Apply multi-file UXML/USS edits with rollback. |
Jobs |
|
| List paginated job history owned by the calling agent. |
Jobs |
|
| Read one owned historical job snapshot. |
Project extensions |
|
| List project-defined extension tools from loaded Unity editor assemblies. |
Project extensions |
|
| Execute a project-defined extension tool by |
Project Extensions
Project-specific batch tools can live in the Unity project instead of this package. Put an Editor script in the project and mark a static method with MCPProjectToolAttribute:
using System.Collections.Generic;
using UnityMCP.Editor;
public static class ProjectMcpTools
{
[MCPProjectTool("battleidle/add-property",
Description = "Create and register a BattleIdle property.",
InputSchemaJson = "{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"}},\"required\":[\"id\"]}",
MutatesAssets = true,
FirstClass = true)]
public static object AddProperty(Dictionary<string, object> args)
{
// Project-specific AssetDatabase / prefab / settings edits go here.
return new { success = true };
}
}Project tools opt into first-class concrete exposure with FirstClass = true, using their declared schema:
{
"route": "project-tools/call/battleidle/add-property",
"toolName": "unity_pt_battle_add_prop",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": ["id"]
}
}Declare the behavior explicitly: use exactly one of ReadOnly = true, MutatesAssets = true, or MutatesRuntime = true. A first-class project tool must declare one of these operation kinds. Tools without FirstClass = true stay out of the default tool surface and remain discoverable through paginated project-tools/list.
Execute a lazily exposed project tool through project-tools/execute with:
{
"toolName": "battleidle/add-property",
"args": {
"id": "gold_amount"
}
}Concrete project-tools/call/... routes are reserved for tools that explicitly opt into first-class exposure; project-tools/execute is the canonical route for the remaining project catalog.
Notes
Use the upstream README for the general feature list and MCP setup flow.
_meta/toolsdefaults to compact first-class metadata, 50 tools per page, and no schemas. UseincludeSchema=true,offset,limit, and optionalcategoryas needed. Legacy duplicate collections are returned only withcompact=false&includeCollections=true.Successful wire responses omit the redundant inner
success=true. Project-tool success envelopes are unwrapped, exact collection counts and completed-pagination aliases are omitted, and false truncation flags are absent. A partial page keeps only its collection, total, andnextOffset.Wire-only Unity values use compact scalar forms such as
position: "(1,2)",rect: "(1,2)-(4,5),size:(3,3)",bounds: "(0,0,0)-(2,4,6),size:(2,4,6)",color: "rgba(1,0.5,0,1)", andmargin: "LTRB(1,2,3,4)". Equivalent dictionary shapes, execute-code values, complete reflectedRectaliases, and dimension pairs inside larger results are compacted centrally; internally queued command data remains structured.The repeated transport identity is
mcpInstance: "Project@port". Detailed paths and process metadata remain available from the instance routes; wrong-project errors keep the actual path, name, and port.Error payloads keep
success=false,error,errorCode, andretryable; an identicalmessagealias is omitted.Compilation diagnostics return
isCompiling,counts.errors,counts.warnings,entries, and the independently surfaceddeprecatedWarnings. Totals appear only when an entry list was actually truncated.Queue tickets keep atomic status snapshots through Unity domain reloads. Queued work and interrupted reads resume with the same ticket; transport wait timeouts never overwrite the persisted business state.
prefab-asset/add-componentalso persists its pre-refresh/mutation phase and reconciles the prefab before resuming. Other interrupted mutations returnUncertainAfterReloadand require target reconciliation before a new request. Stable idempotency keys prevent retry submissions from duplicating work.For multiple Unity projects open at once, select or resolve the target instance before mutation. The MCP server forwards its path/name automatically, and the Editor rejects unbound mutations with
target_project_requiredor mismatches withwrong_unity_project.Project binding fields such as
expectedProjectPathandexpectedProjectNameare transport metadata. The bridge validates them before dispatch and does not forward them into a project tool's strict business-argument schema.unity_wait_editor_idlewaits for both consecutive idle editor frames and a continuous idle time window (stableMs, default500) to avoid returning before a delayed compile or asset import starts. Its timeout measures active Editor time and pauses while the AppDomain is reloading.Planned domain reloads keep the instance registry entry with
isReloading=true; a successful bridge restart replaces it with a ready entry, while a real server stop or Editor quit still unregisters immediately.mcp/healthis intended for diagnosing editor slowdown caused by MCP usage. It does not stop the bridge; usemcp/set-autostartto prevent the bridge from coming back automatically after reload.texture/import-imageis the preferred route for Figma/exported UI images: passsourceUrlorsourcePath,targetPathortargetFolder+assetName, then usepreset=pixel-spriteandborderwhen needed.For UI visual QA, use
uitoolkit/locate-elementfirst to confirm the measured semantic target, thenuitoolkit/capture-elementoruitoolkit/compare-elementfor local crops. Useuitoolkit/generated-childrenwhen controls such asTabView,DropdownField,Scroller, orToggleButtonGroupmay be drawing default child indicators.The UI Toolkit static audits are explicit read-only tools in every project. Automatic import and filesystem-write warnings are opt-in through
ProjectSettings/UnityMCPUIToolkitAudit.json, so installing the package does not impose an authoring policy on unrelated projects. The configuration acceptsautomaticAudit.ussSingleUseStyles,automaticAudit.uxmlLayoutContracts, the optionalpixelGrid.enabledand positivepixelGrid.step,assetRoots,runtimeSourceRoots, andexcludePaths. Pixel-grid auditing is off unless a project enables it, and checks structural offsets, margin/gap spacing, and padding in both USS declarations and UXML inline styles. Reasoned local exceptions use/* uss-audit: allow-single-use <reason> */,/* uss-audit: allow-redundant-declaration <reason> */,/* uss-audit: allow-off-grid-pixels <reason> */,<!-- uxml-layout-audit: allow-manual-center <reason> -->,<!-- uxml-layout-audit: allow-repeated-inline <reason> -->,<!-- uxml-layout-audit: allow-redundant-inline <reason> -->,<!-- uxml-layout-audit: allow-inert-text-stretch <reason> -->,<!-- uxml-layout-audit: allow-inert-text-grow <reason> -->,<!-- uxml-layout-audit: allow-single-child-centering-wrapper <reason> -->,<!-- uxml-layout-audit: allow-unconsumed-element-name <reason> -->,<!-- uxml-layout-audit: allow-fixed-flex-partition <reason> -->, and<!-- uxml-layout-audit: allow-off-grid-pixels <reason> -->.Prefab asset mutation tools return a summary-only
prefabFileDiffby default. PassincludePrefabFileDiff=falseto suppress it or requestprefabFileDiffMode=minimal/fullwhen line details are required. Useunity_prefab_asset_transaction_editfor multi-step edits.Prefab saves retry transient Windows file locks, including Win32 error 1224. YAML normalization and diff capture are auxiliary;
prefab-asset/set-propertyreports persistence only after Unity serialized readback confirms the requested value.uitoolkit/builder-previewopens and screenshots UI Builder. Its GPU-composited viewport is captured from the temporarily raised on-screen window because Win32PrintWindowonly returns the shell. Unity does not expose a stable public UI Builder zoom API, so the route records requested zoom values but does not use reflection to force the viewport zoom.Runtime
uitoolkit/capture-elementcrops from the Game View render texture, keeping UI panel coordinates aligned with pixels and avoiding black GPU surfaces in Editor-window captures.build/startreturns a job ID beforeBuildPipeline.BuildPlayerbegins. Pollbuild/get-job; the terminal result contains the authoritative BuildReport, so do not force an AssetDatabase refresh after a successful build. Keepoverwrite=truefor repeat tests so output folders do not accumulate.asset/refreshlikewise returns a job ID. Pollasset/get-refresh-job; if scripts trigger a domain reload, the persisted workflow resumes after the Editor becomes idle instead of losing the active MCP response.unity_packages_update_gitdefaults toskipIfResolved=true. When the requested ref is a commit hash already recorded inpackages-lock.json, the tool returnsskipped=truewithout asking Unity Package Manager to resolve again. Passforce=trueto force a resolve.This fork intentionally keeps the package smaller by removing local documentation images.
The package is still the Unity Editor side only. You need an MCP server/client setup to call the tools from an assistant.
Package updates can take time if Unity needs to fetch from GitHub. Pinning commits keeps project state reproducible.
License
This fork follows the upstream license. See LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/VM233/VMUnityMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server