/ Verzeichnis / Playground / mcp-unity
● Community CoderGamester ⚡ Sofort

mcp-unity

von CoderGamester · CoderGamester/mcp-unity

A focused Unity MCP for scene editing, tests, and prefab work — simpler surface than the bigger alternatives.

CoderGamester/mcp-unity is a Node-based MCP plugin for Unity 6+ with ~30 well-scoped tools: scene management, GameObject manipulation, components, prefabs, materials, tests, console. Designed for Cursor, Claude Code, Codex, Windsurf.

Warum nutzen

Hauptfunktionen

Live-Demo

In der Praxis

unity-3.replay ▶ bereit
0/0

Installieren

Wählen Sie Ihren Client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "unity-3": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/CoderGamester/mcp-unity"
      ],
      "_inferred": true
    }
  }
}

Öffne Claude Desktop → Settings → Developer → Edit Config. Nach dem Speichern neu starten.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "unity-3": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/CoderGamester/mcp-unity"
      ],
      "_inferred": true
    }
  }
}

Cursor nutzt das gleiche mcpServers-Schema wie Claude Desktop. Projektkonfiguration schlägt die globale.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "unity-3": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/CoderGamester/mcp-unity"
      ],
      "_inferred": true
    }
  }
}

Klicken Sie auf das MCP-Servers-Symbol in der Cline-Seitenleiste, dann "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "unity-3": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/CoderGamester/mcp-unity"
      ],
      "_inferred": true
    }
  }
}

Gleiche Struktur wie Claude Desktop. Windsurf neu starten zum Übernehmen.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "unity-3",
      "command": "TODO",
      "args": [
        "See README: https://github.com/CoderGamester/mcp-unity"
      ]
    }
  ]
}

Continue nutzt ein Array von Serverobjekten statt einer Map.

~/.config/zed/settings.json
{
  "context_servers": {
    "unity-3": {
      "command": {
        "path": "TODO",
        "args": [
          "See README: https://github.com/CoderGamester/mcp-unity"
        ]
      }
    }
  }
}

In context_servers hinzufügen. Zed lädt beim Speichern neu.

claude mcp add unity-3 -- TODO 'See README: https://github.com/CoderGamester/mcp-unity'

Einzeiler. Prüfen mit claude mcp list. Entfernen mit claude mcp remove.

Anwendungsfälle

Praxisnahe Nutzung: mcp-unity

How to build a simple scene from chat with minimal ceremony

👤 Indie Unity devs ⏱ ~15 min beginner

Wann einsetzen: You want a Unity MCP without 100+ tools cluttering your context.

Voraussetzungen
  • Unity 6 or later — unity.com/download
  • Node 18+ — nodejs.org or nvm
  • Install package from git URL — Package Manager > + > Add from git URL: https://github.com/CoderGamester/mcp-unity.git
Ablauf
  1. Compose a scene
    Create a new scene 'Playground'. Add a Plane, a Directional Light, and 3 cubes at positions (-2,0,0), (0,0,0), (2,0,0).✓ Kopiert
    → Scene appears, objects visible
  2. Wire up interactions
    Add a Rigidbody and BoxCollider to each cube. Make cube at origin kinematic.✓ Kopiert
    → Components visible on inspect
  3. Run tests
    run_tests mode=EditMode. Show failures.✓ Kopiert
    → Test output

Ergebnis: A working scene + passing tests, all in chat.

Fallstricke
  • batch_execute rollback behavior varies — not a real transaction — Assume partial success on error; verify after batch
Kombinieren mit: github

How to author and instantiate prefabs from chat

👤 Unity devs building reusable assets ⏱ ~15 min intermediate

Wann einsetzen: You want the agent to maintain a prefab library.

Ablauf
  1. Create a prefab
    Build a GameObject 'Enemy' with Rigidbody + EnemyAI component, then create_prefab from it at Assets/Prefabs/Enemy.prefab.✓ Kopiert
    → Prefab file created
  2. Instantiate
    add_asset_to_scene Assets/Prefabs/Enemy.prefab at 5 random positions within 50 units of origin.✓ Kopiert
    → 5 enemies placed

Ergebnis: A reusable Enemy prefab + 5 placed instances.

How to iterate on a fix with run_tests in a tight loop

👤 Unity devs with test coverage ⏱ ~15 min intermediate

Wann einsetzen: Bug + test exists; want fast red-green-refactor.

Ablauf
  1. See the failure
    run_tests mode=EditMode filter='EnemyAI_ShouldPatrol'. Show the stack.✓ Kopiert
    → Failing assertion with line
  2. Edit and retest
    Apply the minimal fix, save, and rerun the test.✓ Kopiert
    → Green test

Ergebnis: Green test, confidence in fix.

Kombinieren mit: github

Kombinationen

Mit anderen MCPs für 10-fache Wirkung

unity-3 + github

Run tests, then commit + PR the fix

Fix EnemyAI test failure, commit on branch fix/enemy-patrol, open a PR.✓ Kopiert

Werkzeuge

Was dieses MCP bereitstellt

WerkzeugEingabenWann aufrufenKosten
create_scene name: str Start a new scene free
load_scene path: str Open existing scene free
get_gameobject name_or_id: str Look up one object free
update_gameobject id, props Rename, re-parent, toggle active free
update_component target, component, values Tweak component fields free
create_prefab source_id, path Capture an object as prefab free
add_asset_to_scene path, position?, rotation? Instantiate an asset/prefab free
run_tests mode: 'EditMode'|'PlayMode', filter? Unit tests free
get_console_logs since_ms? Check errors free
batch_execute calls: Call[] Compose several tool calls free

Kosten & Limits

Was der Betrieb kostet

API-Kontingent
None — local only
Tokens pro Aufruf
Small; this MCP has a tight tool list
Kosten in €
Free (open source)
Tipp
Batch related ops via batch_execute to reduce round trips.

Sicherheit

Rechte, Secrets, Reichweite

Minimale Scopes: Local project access only
Credential-Speicherung: None
Datenabfluss: Localhost; LLM sees whatever your tool returns
Niemals gewähren: Expose the Node bridge to non-loopback

Fehlerbehebung

Häufige Fehler und Lösungen

Unity 'package could not be resolved'

Requires Unity 6 or later. Check version; git URL install fails on older editors.

Node bridge crashes on startup

Requires Node 18 + npm 9. Check 'node -v' and upgrade.

Prüfen: node -v
Tests don't appear

Test assemblies must be defined in Assembly Definition files referencing TestRunner.

Alternativen

mcp-unity vs. andere

AlternativeWann stattdessenKompromiss
MCP for Unity (CoplayDev)You want the largest Unity tool surface with physics/VFX coverageMore tools = more context cost
Unity-MCP (IvanMurzak)You need Roslyn-backed one-shot C# executionMore power, more risk

Mehr

Ressourcen

📖 Offizielle README auf GitHub lesen

🐙 Offene Issues ansehen

🔍 Alle 400+ MCP-Server und Skills durchsuchen