xuunity-mcp
XUUnity MCP is a lightweight Unity MCP server for safe Unity Editor automation.
Install / Use
claude mcp add FoxsterDev -- npx -y github:FoxsterDev/xuunity-mcpIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AutomationSupported Platforms
Skill content
View source on GitHubWhy Use It
Use XUUnity MCP when you want a local-first, validation-first Unity MCP for safe editor automation, not broad unrestricted editor mutation.
- compile checks without switching the active Unity build target
- EditMode and PlayMode tests with normalized result accounting
- scene snapshots, scene assertions, console tail, and Game View screenshots
- bounded scenario validation and request-journal recovery after editor reloads
- same-host multi-project routing for workstations with multiple Unity projects
- editor-only package, disabled by default, with no player-build footprint by default
Search positioning keywords for this repo:
xuunity mcpunity mcplightweight unity mcpsafe unity mcpvalidation-first unity mcpunity mcp for compile checks and tests
Quick Start
Choose one path first:
- Agent Quick Start for AI-driven setup from a short prompt
- Manual Install for direct human setup
- Verify Existing Install when the helper or client wiring may already exist
Prerequisites
- Unity 2021.3 LTS+; the current release has live validation on Unity 2021.3, 2022.3, and 6000.x. See Status.
- Python 3.10+
- one MCP client: Claude Code, Claude Desktop, Cursor, Rider, Windsurf, Antigravity IDE, or a Codex-style agent with the Codex visual setup guide
Before running the helper, verify which Python it will use:
command -v python3
python3 --version
If your default python3 is older than 3.10, set PYTHON explicitly before
running run_installed_or_refresh_xuunity_mcp.sh, run.sh, or
xuunity_light_unity_mcp.sh.
On native Windows (PowerShell or cmd.exe):
py -3 --version
# or: python --version
The .cmd and .ps1 launcher flavors probe py, then python, then
python3, reject the Microsoft Store stub interpreter, and require Python
3.10+. Set PYTHON to a full python.exe path when the probe picks the wrong
interpreter.
Important:
- UI auto-review, sandbox auto-approval, or tool-level approval is not the same thing as user approval of setup mutations.
- An existing host-tools directory may be reused, but its helper files must not
be executed until their version and
.source_roothave been compared with the requested release. Refresh stale helper files from the approved release source first; file existence alone does not mean the helper is current.
Agent Quick Start
This section is the fast-path for AI agents that need to install MCP into a new repo and run the first MCP command or EditMode tests correctly.
Agent Defaults
Use this contract when the user gives a short request such as:
[!IMPORTANT] Replace
/path/to/UnityProjectwith the absolute path to your Unity project before sending the prompt. Example shape for macOS/Linux:/absolute/path/to/MyGame. On Windows, use an absolute drive-letter or UNC path.
Set up XUUnity Light Unity MCP release v0.3.57 from the canonical repository
https://github.com/FoxsterDev/xuunity-mcp for /path/to/UnityProject, follow
https://github.com/FoxsterDev/xuunity-mcp/blob/v0.3.57/README.md. Before executing
an existing helper, compare its version and .source_root with v0.3.57 and refresh
stale files from that release. On native Windows, migrate only the XUUnity client
block to cmd.exe plus run_installed_or_refresh_xuunity_mcp.cmd. After any helper
or client-config change, restart or refresh the client, list the live MCP tools,
and run unity_status_summary. Require mcp_server_info.version=0.3.57 in that live
result. Only then run EditMode tests.
Agent defaults:
- treat the current host client that is executing the request as the default MCP wiring target unless the user explicitly names a different client
- treat the explicitly requested Unity project path as the only default setup target
- prefer Git UPM package mode unless the user explicitly asks for local package development
- reuse an existing helper install directory only after comparing its installed
version and
.source_rootwith the requested release; refresh stale files before executing the helper - on native Windows, require
cmd.exeplusrun_installed_or_refresh_xuunity_mcp.cmd; an existingbash/run.shclient block requires an approved migration, not reuse
Required Sequence
- Read the release-pinned
https://github.com/FoxsterDev/xuunity-mcp/blob/v0.3.57/README.md, itsINSTALL.md, and the matchingdocs/clients/*guide for the current host client. - Run a non-mutating preflight:
- confirm Python 3.10+
- confirm Unity project structure
- detect whether the request targets one Unity project or an entire workspace
- compare the requested package release with the current manifest pin
- inspect the installed helper version,
.source_root, and refresh launcher before executing any existing helper - on native Windows, inspect the client block for the required native
.cmdlauncher - identify whether user-level client config such as
~/.codex/config.tomlor~/.claude.jsonwould change
- Produce a setup plan before mutating files:
- for one requested Unity project, use
setup-plan --project-root "<UNITY_PROJECT_ROOT>" - for a workspace or nested hub, use
setup-plan --workspace-root "<WORKSPACE_ROOT>" --recursive
- for one requested Unity project, use
- Show a short preflight review and wait for approval before any mutation, clone, installer run, manifest change, or user-level client config update.
- After approval, apply setup only to the approved project roots.
- Run
validate-setup. - Run
ensure-ready --open-editorwhen Unity is not already ready and wait for it to finish before checking status. Record whether the result reportsopened_by_host: true. - Run the first status check:
- use
request-status-summarywhen the current client session cannot see newly wired MCP tools yet - use
unity_status_summaryas the first live MCP-tool smoke check after the client has loaded the server
- use
- After any helper or client-config change, restart or refresh the client,
confirm that
xuunity_light_unityappears in its MCP server list, list the live MCP tools, and rununity_status_summary; requiremcp_server_info.version=0.3.57. Helper-only validation does not prove that the current MCP client session is connected. - When the user requested tests, run EditMode tests only after the live status summary is healthy.
- If
ensure-ready --open-editoropened Unity for this run (opened_by_host: true), restore editor state before the final report:xuunity_light_unity_mcp.sh restore-editor-state --project-root "<UNITY_PROJECT_ROOT>"xuunity_light_unity_mcp.sh verify-editor-closed --project-root "<UNITY_PROJECT_ROOT>" --timeout-ms 0
- Finish with:
- files changed
- commands run
- readiness result
- first MCP command result
- EditMode test result
- whether a client restart is still required
- whether Unity was restored/closed when opened by the helper
Preflight Review Checklist
- detected current client
- intended client wiring target
- requested Unity project root
- any additional discovered Unity projects
- requested package release and current manifest pin
- installed helper version, source root, and refresh requirement
- current client launcher flavor
- whether setup will modify user-level client config
- files planned for mutation
- commands planned after approval
- whether the client must restart or refresh its MCP server list afterward
Required Preflight Review Template
Every agent should show a short review block like this before setup-apply:
Preflight review
- Current client: <detected client>
- Wiring target: <target client>
- Unity project root: <approved project root>
- Additional discovered Unity projects: <none or list>
- Existing helper directory: <present | missing>
- Requested package release: <v0.3.57>
- Current package pin: <missing | current | stale | custom>
- Helper state: <current | refresh required | missing> (<installed version and source root>)
- Client launcher: <native/current | migration required>
- Planned project file changes: <manifest, bridge config, lockfile, none>
- Planned user-level config changes: <exact file paths or none>
- Restart or refresh required after mutation: <yes/no and which client>
- Required live proof after restart: <server listed, tools listed, unity_status_summary healthy with mcp_server_info.version=0.3.57>
- Planned commands after approval: <setup-apply, validate-setup, ensure-ready, request-status-summary, unity_status_summary after reload, ...>
Do not run setup-apply, installer commands, helper sync, or client config edits
until the user explicitly approves this review.
Safe Inspect Before Approval
- reading docs
- checking Python and Unity versions
setup-planfrom this wrapper, which must not refresh or write the installed helperuninstall-planfrom this wrapper, w
Truncated for display — read the full file on GitHub.
Related Skills
momen-cursurrules-prompt-file
40.6kCursor rules for building custom frontends with Momen.app as headless BaaS with GraphQL API, actionflows, AI agents, and Stripe integration.
pyspark-etl-best-practices-cursorrules-prompt-file
40.6kCursor rules for PySpark ETL development with code style, joins, window functions, map operations, and Iceberg patterns.
semiotic-react-dataviz-cursorrules-prompt-file
40.6kCursor rules for Semiotic data visualization library with 30+ chart types, MCP server, and AI-assisted chart generation.
Agent-Reach
72.4kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
