● Community
IvanMurzak
⚡ Sofort
Unity-MCP
von IvanMurzak · IvanMurzak/Unity-MCP
Full AI develop-and-test loop for Unity with 100+ tools, Roslyn-backed C# execution, and a CLI for quick setup.
IvanMurzak/Unity-MCP is a Unity plugin + MCP server that exposes a wide surface (scenes, GameObjects, components, prefabs, materials, packages, screenshots, tests, Roslyn C# execution) to any MCP client. Emphasizes token efficiency and an AI Skills layer on top of raw tools.
Warum nutzen
Hauptfunktionen
100+ tools across assets, scenes, scripts, components, tests, and editor state Roslyn-based C# code execution for one-shot automation snippets Screenshot capture from scene/game/any camera — great for visual verification CLI (unity-mcp-cli) for quick per-project plugin install Supports stdio and streamable HTTP transports, multi-agent compatible
Live-Demo
In der Praxis
unity-2.replay
▶ bereit
▶ Abspielen
Schritt ›
0/0
Anwendungsfälle
Praxisnahe Nutzung: Unity-MCP
Wann einsetzen: You have 200 new textures and want consistent import settings, mip maps, and atlas placement.
Voraussetzungen
Unity project open, plugin installed — unity-mcp-cli install-plugin ./MyUnityProject or import the .unitypackageAn MCP client configured — Point Claude Desktop or Cursor at the local MCP server printed by the CLI
Ablauf
Audit current settings
List every texture in Assets/Textures/UI. Show current TextureImporter settings grouped by the values used.✓ Kopiert
→ Groups by settings — mostly consistent with outliers flagged
Apply a policy
For all of them set compression=HighQuality, filter=Bilinear, mipmaps=false. Reimport.✓ Kopiert
→ Progress log + final consistent state
Verify visually
Take a screenshot of Scene MainMenu from the default camera — confirm nothing looks broken.✓ Kopiert
→ Screenshot returned, sanity-check passes
Ergebnis: Uniform import settings across a folder + a screenshot trail.
Fallstricke
Reimport blocks the editor domain reload — Save scene first; don't issue unrelated commands until reimport is done
Wann einsetzen: You want to iterate through every prefab and fix a broken reference — once.
Ablauf
Describe the snippet
Execute C# via Roslyn: iterate every prefab under Assets/Prefabs, find MissingScript components, list the prefab + missing script guid.✓ Kopiert
→ Report of bad prefabs
Apply the fix
Now remove those MissingScript components and save each prefab.✓ Kopiert
→ Updated prefab count
Ergebnis: A project free of missing-script warnings.
Fallstricke
Roslyn exec has full editor power — a bad snippet can corrupt the project — Commit to git before running; review the code snippet before executing
Wann einsetzen: A tester says 'the menu looks wrong' and you want a ground-truth image fast.
Ablauf
Open the suspect scene
Open scene MainMenu and take a screenshot from the UI camera at 1920x1080.✓ Kopiert
→ Screenshot file path returned
Compare with a reference
Here is the golden image [attach]. Describe the differences.✓ Kopiert
→ Specific callouts (offsets, colors, missing elements)
Ergebnis: A bug report with image evidence attached.
Kombinationen
Mit anderen MCPs für 10-fache Wirkung
Automate refactors + commit + PR from chat
Rename the PlayerController.Speed field to MoveSpeed everywhere, run tests, commit and open a PR.✓ Kopiert
Import external 3D models into the project
Move every .fbx from ~/Downloads/kenney/ into Assets/Models/ and set them to read/write disabled.✓ Kopiert
Kosten & Limits
Was der Betrieb kostet
API-Kontingent No remote API — all local
Tokens pro Aufruf Scene listings can grow large; cap with filters
Kosten in € Free, open source
Tipp Prefer narrow queries (gameobject_find 'Enemy*') over full-hierarchy dumps.
Sicherheit
Rechte, Secrets, Reichweite
Minimale Scopes: Local filesystem write to the project
Credential-Speicherung: None — localhost only
Datenabfluss: Localhost. Your LLM provider receives whatever scene/script content the tool returns.
Niemals gewähren: Do not expose the MCP HTTP port to non-loopback interfaces
csharp_execute can read/write anything the editor can — commit before risky runs.
Fehlerbehebung
Häufige Fehler und Lösungen
Project path contains spaces: tools fail
Move the project to a path with no spaces. This is a documented limitation.
CLI cannot find Unity
Set UNITY_EDITOR_PATH env var to the editor binary.
Prüfen: $UNITY_EDITOR_PATH -version
csharp_execute throws 'type not found'
Unity must have compiled successfully before execution. Fix red console first and refresh.
Alternativen
Unity-MCP vs. andere
Alternative Wann stattdessen Kompromiss
MCP for Unity (CoplayDev) You want the most popular option with a large tool surface No Roslyn-based arbitrary C# execution
mcp-unity (CoderGamester) Simpler surface focused on scenes/tests Fewer advanced tools