# german-krasnikov/unity-biome-mcp [Health: Active]

**Category:** 🎮 Gaming  
**Repository:** https://github.com/german-krasnikov/unity-biome-mcp  
**GitHub Stars:** 34  
**Views:** 12  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/german-krasnikov-unity-biome-mcp

## Description
#️⃣ 🏠 🍎 🪟 🐧 - Control the Unity Editor from 10 MCP clients or from chat inside Unity. 47 tools for scenes, GameObjects, components, Shader Graph, materials, animation, and UI. PlayTest DSL for deterministic scenario verification, batch operations with Undo rollback, token-efficient plain-text protocol, screenshots with visual diff. Cross-platform CI, 11,700+ tests, MIT.

## Tools
Capabilities this server exposes over MCP:

- **sync_unity** — Refresh Unity and await its matching compile cycle within one timeout.

resolve=True resolves packages first; bump=True increments the plugin patch
version once per connection and implies resolve. 'sync clean' means the
observed cycle completed without captured errors; it is not a hash proof
that every source file was compiled. Timeout does not cancel Unity effects.

- **reconnect_unity** — Reconnect to Unity. Port 0 or omitted = auto-discover from port files.
- **discover_tools** — Find and enable tools by category.
Canonical 10: SCENE, COMPONENTS, ASSETS, UGUI, UITOOLKIT, MEDIA,
VERIFY, RUNTIME, TESTS, SYSTEM.
include_legacy=True adds legacy aliases (object, animation, etc.).
structured=True adds surface/mutability info. enable=False to browse only.
- **apply_scene_change** — Execute scene mutations with atomic apply, post-verify, and optional save.
1. Validate plan_id exists and not expired (TTL 600s)
2. Reject empty input and commands outside the Unity-Undo-safe scene allowlist
3. Execute an atomic, stop-on-error batch
4. On batch failure/rollback: stop without verification or save
5. If verify: require clean references and console before save
6. If save: save only after a successful batch and verification
7. Return applied, verified, and saved states separately
Allowed commands: attach_uitk, auto_wire, autofit_collider, create_object,
create_ui, delete_object, manage_component, rename_object, set_active,
set_parent, set_property, set_property_delta, set_rect, set_sibling_index,
unwire_event, wire_event. Use batch for all other command types.
- **await_compile** — Block until Unity finishes compiling + reloading, then return compile errors.
Use after writing .cs files instead of sleep. Returns errors or 'compile clean (Xs)'.
Handles domain reload disconnects transparently. timeout=0 → immediate check, no loop.
Epoch-aware via sync_status when available (+10 from MAJOR-1); falls back to compile_status.
- **batch** — Execute multiple commands in one call. Use for 2+ ops — reads AND writes. commands: one per line (cmd key=value). on_error: continue|stop (default continue). timeout: seconds (default 75; inner soft-timeout capped at 60s). atomic: reverts prior Undo-recorded mutations on failure; external/file/asset/package/process effects may remain. PREFER over individual tool calls.
- **compile_preflight** — Validate C# WITHOUT writing/recompiling (Roslyn). Use before writing .cs — catches typos in ~200ms vs 30s recompile.
file_path: Assets-relative. new_content: full file. Returns OK preflight (ms) / ERR preflight + diagnostics / [ROSLYN UNAVAILABLE].
- **console_mark** — Create a console watermark. Returns mark_id encoding current timestamp.
Pass to get_console_since() to retrieve only logs after this point.
Pure Python — no TCP call.
- **create_object** — Create new GameObject. components: comma-separated types to add on creation. primitive: Cube|Sphere|Cylinder|Capsule|Plane|Quad. prefab_path: instantiate from prefab asset. scene: create in named loaded scene (omit = active scene).
- **delete_object** — Delete GameObject by instance ID or scene path. Deletes scene objects. No confirmation required. Provide one. force=True to delete non-empty containers.
- **editor** — Editor state/control.
action: state|mutation_mode (omit enable to query current intent; enable=True/False to set it)|play|pause|stop|
select (path (single) or paths (comma-sep multi, e.g. "/Player,/Enemy,/NPC"))|project_path.
- **execute_code** — Execute C# code in Unity Editor via Roslyn. 10-40x faster than recompile.
Security uses a configurable source-pattern scan; the default AllowAll level skips it. Execution is not sandboxed.
Bare statements are auto-wrapped in a static class — no boilerplate needed.
Example: "var go = new GameObject(\"Test\"); return go.name;"
- **get_changeset** — Return the current ChangeSet: accumulated mutations this session.
Use after any mutation sequence to review what changed.
- **get_compile_errors** — Compilation errors with file:line:column. Not lost on Console.Clear(). Structured, typed.
- **get_component** — Component properties as key-value. For MULTIPLE objects, use inspect(paths='a,b,c') instead — 1 call vs N.
fields: comma-separated field names to keep (e.g. 'mass,position') — projects the result to save tokens; shows requested fields even at default values. Aliases: position, rotation, scale, mass, enabled, active, name.
full=True: bypass distillation, return raw response. compress=True: strip default values before transfer.
component: alias for type= (backward-compat with set_property naming). type= wins when both provided.
- **get_console** — Recent console logs. For C# compile errors use get_compile_errors instead. keyword: case-insensitive substring filter. count_only: return N matches as string. since: only logs from last N seconds.
- **get_console_since** — Console entries after the watermark created by console_mark().
mark_id: string from console_mark() or bare float timestamp.
level: optional filter ('error,exception,assert').
keyword: case-insensitive substring filter.
count_only: return match count as string.
count: max entries to return (default 500).
- **get_hierarchy** — Scene hierarchy as text tree. For finding specific object by name/type use search_scene. Max 3000 nodes. Use filter/depth to narrow. Set components=true to see component types. Set compress=true to group repeated slots/points/meshes. Set summary=true for compact root-only counts (60-100 tokens). Set incremental=true to get NO_CHANGE if scene unchanged since last call. full=True: bypass distillation. scene: filter to a single scene by name (multi-scene only).
- **inspect** — Get components for multiple objects at once. paths: comma-separated. components: comma-separated types (default: all).
find_type: component type to find — populates paths automatically (replaces explicit paths).
fields: comma-separated field names to keep across all objects — projects the result to save tokens. full=True: bypass distillation. compress=True: strip default values before transfer.
- **lint_scene_refs** — Read-only linter for scene references in DSL scripts or batch commands.
path: project-relative path to .playtest file.
snippet: inline DSL or batch commands to lint (mutually exclusive with path).
Checks: unresolved aliases, embedded aliases, missing objects, ambiguous names.
Returns: 'OK: no issues' or severity-tagged issues (ERROR/WARN) with file:line:token.
- **manage_component** — Add or remove a component. Mutates scene. No confirmation required. type: short name (e.g. 'Button') or full namespace (e.g. 'UnityEngine.UI.Button').
no 'enable'/'disable' — use set_property with prop='m_Enabled' for that.
action: add|remove.
- **mcp_status** — Compact MCP status: scene, dirty, play/compile state, port, alias count,
version — plus Python-side liveness diagnostics (ARC-7 T3) that answer
honestly, never raising, when Unity itself is unreachable.
liveness: connected | connected-stalled | waking | reconnecting | domain-reloading | dormant | disconnected | unknown
- **permission_prompt** — Handle Claude permission prompts via MCP.
Registered as --permission-prompt-tool so Claude routes all permission
checks here instead of blocking on stdin.
- **resolve_tool_schema** — Return full parameter schemas for deferred tools. tools=comma-separated names.
- **run_playtest** — [Play Mode] Execute a playtest DSL script. Returns structured report (for NUnit tests, use `run_tests`).
Commands: MOVE TO x,y,z | WAIT n | WAIT_UNTIL query op value | ASSERT query op value |
ASSERT_CONSOLE_CLEAN [IGNORE "pat"] | SNAPSHOT queries | INVOKE path comp method args |
SET path comp field value | LOG msg | TIMESCALE n | ASSERT_CONSERVED SUM a+b OVER t |
ASSERT_CTA VISIBLE|CLICKABLE | VAL name query | TELEPORT path x,y,z |
ASSERT_BATCH...END | ASSERT_NEAR pathA pathB dist | INVARIANT query op value |
SIMULATE name [DURATION n] [TIMESCALE n] | MONITOR name | TRACE_FLOW FROM a TO b FIELD f |
CAPTURE label query | ASSERT_CAPTURED label INCREASED|DECREASED.
defs: inline VAL definitions prepended to script.
abort_on_fail=True: stop after the first failed step or automatic console failure; skip all remaining steps including teardown.
format="json": return the canonical step-ledger receipt instead of the legacy text report; skips compression/summarization.
Non-pass outcomes (fail/aborted/malformed/empty) raise ToolError with the full report text (both sync and async routes).
- **run_playtest_suite** — Run multiple .playtest files sequentially and return a compact matrix.
Side effects: auto_play/restart_between may enter or restart Play Mode;
stop_after exits Play Mode. No confirmation is requested.
pattern: glob pattern (e.g. 'Playtests/*.playtest'), comma-separated list,
         or newline-separated list of project-relative paths.
suite_path: absolute path to a .suite file (lines = project-relative .playtest paths, # = comment).
Exactly one of pattern or suite_path must be provided.
stop_on_fail=True: abort suite after first failure.
stop_after=True: exit Play Mode when suite completes.
auto_play=True: enter Play Mode automatically if not already playing.
restart_between=True: stop+play between each file to reset runtime state;
with auto_play=True, also resets an already-running editor before file one.
suite_timeout: total suite wall-clock deadline in seconds (default 300s).
tag: only run files whose `# @tags` header (space-separated) includes this
tag; matches after pattern/suite_path resolution. A tag that matches zero
files fails closed (same shape as an empty pattern/suite match), it never
silently runs the unfiltered set.
Lifecycle commands must return successfully and reach their observed state.
A failed transition stops the suite and is reported as a failed row.
Empty matches return a failing SUITE: 0/0 report.
Output: SUITE: X/Y passed (Zs) terminal:true play_stopped:true/false + per-file lines.
- **run_tests** — Dispatch Unity tests and return their durable identity immediately.
A successful response is
``tests-started|request_id=...|run_id=...|utf_guid=...|state=dispatched``.
If transport fails after dispatch may have happened, the result is
``START-UNKNOWN`` with the same request_id; resolve it instead of retrying
with a new identity.
assemblies/categories/tests: comma-separated selection lists narrowing
the run (assembly names, NUnit categories, fully-qualified test names).
group: a named test group to restrict the run to.
- **run_tests_wait** — Dispatch tests and wait for the exact run to become terminal. Dispatches test run. No confirmation required.
Transport failures and domain reloads do not erase the last snapshot. A
caller timeout is observational only: it returns ``TIMEOUT`` with request,
run and snapshot data and never marks the Unity run complete.
on_timeout: result starts with TIMEOUT|request_id=...|run_id=... — use run_id to resume polling via get_test_run without re-dispatching.
- **scene** — Scene management.
path: required for open/open_additive/close/set_active/save_copy. For save,
omit it to save to the current path; an untitled scene requires a path.
scene: save/discard/save_copy target when multiple scenes loaded (identifies by name).
include_unsaved: always True — save_copy always captures current in-memory state.
action: new|open|save|discard|open_additive|close|set_active|list|
save_copy (writes current dirty state to path as backup; active scene reference unchanged).
- **scene_change_plan** — Pre-flight + plan for safe scene edit.
1. Check Play Mode — reject if playing (mutations blocked)
2. Check compile clean
3. Check console for errors
4. Resolve targets via resolve_scene_refs
5. Take checkpoint
6. Return plan_id + baseline status
- **screenshot** — Capture screenshot (file path); describe= -> Haiku text (15-100x fewer tokens), raw=True forces path.
camera: scene_view|scene_view_frame|multi_view|single_view|overview|overview_game. angle (single_view): front|left|top|iso|ex,ey,ez.
zoom: higher=closer. angles: per-view Euler "ex,ey,ez|..." (_=skip). supersample 1-4. offset/fixed_size: framing.
highlight: paths[:#RRGGBB] for bbox. show_colliders: wireframes.
annotation_id: frame + highlight annotation by id (auto sets camera=annotation_frame).
warn:ScreenSpaceOverlay canvas not captured in Edit Mode (bypasses camera pipeline).
Workarounds: switch to ScreenSpace-Camera, use Play Mode, or camera=scene_view.
- **search_scene** — Search scene objects. Syntax: name text, t:Component, tag=Tag, layer=N, active=bool. Combine with spaces.
root: scope search to subtree (path or None for whole scene).
limit: max results (default 50; 0=unlimited).
scene: filter to a single scene by name (multi-scene only).
- **set_active** — Set GameObject active/inactive.
- **set_parent** — Reparent existing GameObject. parent=null → move to scene root. world_position_stays=True (default): preserves world transform. False: stays local to new parent.
- **set_property** — Set component property (Edit Mode, SerializedObject — for Play Mode use `invoke_method` or `execute_code`).
find_type: component type — bulk-sets prop on all matching objects without specifying paths.
For GO rename use rename_object(). ObjectReference: scene path (/Player), asset path (Assets/X.mat), sub-asset (Assets/X.fbx::ClipName), &ref (e.g. &1) or $hexId (legacy), #instanceID (legacy), or 'null'. dry_run=True shows what would change without applying.
ref_component_type: when value is a plain scene path and the field expects a specific Component type (e.g. 'BoxCollider'), appends '::TypeName' to the value so C# resolves the correct component. Ignored when value already contains '::'.
effects: mutates scene via SerializedObject, creates an undo entry. Verify with get_component after.
- **ui_intent** — Convert NL intent to Unity UI hierarchy. Templates bypass Haiku.
template: hud|menu|dialog|grid. dry_run=True skips execution.
- **uitk_intent** — Generate a UXML + USS file pair from a natural-language UI description.
Side effect: unless dry_run=True, writes both project assets; attach_to also adds a
UIDocument or PanelRenderer scene component. Completed steps are not rolled back if a later
step fails. Failure output distinguishes retained files, confirmed Unity
auto-reverts, and attempted files whose cleanup is uncertain. Without
template, invokes
configured Claude sampling and may
consume provider quota. For uGUI use ui_intent.
template: hud|menu|dialog|settings|editor_window bypasses Haiku entirely.
name: base filename (e.g. "InventoryPanel" → InventoryPanel.uxml + .uss).
path: output folder, default "Assets/UI".
attach_to: scene path to UIDocument or PanelRenderer GameObject to wire after creation.
dry_run: return UXML+USS text without writing files.
- **validate_references** — Validate all ObjectReference fields under path recursively.
Returns [ERROR]/[MISSING] for broken refs. Summary: "N ERROR, M OK".
Use depth=1 for quick top-level scan, depth=3-5 for full subtree.
verbose=True also shows [OK] lines (off by default to save tokens).
ignore_optional=True skips fields marked [Optional] (reduces noise).
- **verify_after_change** — Single verification gate after code/scene changes.
Gates are additive — only enabled ones run:
1. await_compile (always)
2. get_compile_errors (always)
3. get_console_since mark_id (if mark_id provided)
4. run_tests_wait mode filter (if run_tests_mode provided)
5. run_playtest_suite paths (if playtests provided)
Returns PASS only when ALL enabled gates pass.
Failure includes which gate failed and recommended next command.
- **vfx_intent** — Convert NL intent to Unity VFX setup. Presets bypass Haiku entirely.
kind: particle|auto (shader/material not yet implemented). dry_run=True skips execution.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "unity-biome-mcp": {
    "command": "uvx",
    "args": ["--from","git+https://github.com/german-krasnikov/unity-biome-mcp.git#subdirectory=server","unity-biome-mcp"]
  }
}
```

## Documentation

## What german-krasnikov/unity-biome-mcp does

german-krasnikov/unity-biome-mcp gives MCP-compatible clients a structured interface to the Unity Editor. It can read scene hierarchies, search for objects, inspect components, create and remove GameObjects, change properties, manage components, reparent objects, and control editor state. Scene management includes opening, saving, discarding, copying, and working with multiple loaded scenes.

The server also covers project verification and runtime workflows. Agents can run PlayTest DSL scripts and suites, dispatch Unity tests, check C# before compilation, wait for compilation, inspect console output, validate object references, and capture screenshots. The tool set includes support for materials, shaders, Shader Graph, animation, and UI operations.

## How it works

The Unity package is added from the repository's `unity-plugin` path through the Unity Package Manager. An MCP client communicates with the server while the Unity project remains open, and the plugin applies editor or Play Mode operations inside that project. A setup wizard can configure supported clients, or configuration can be performed manually with client-specific guides.

Read operations return structured or compact text designed to limit unnecessary context. Hierarchy and component queries support filtering, depth limits, field selection, compression, and incremental responses. Mutations can be grouped with `batch`; atomic mode can undo prior Unity-recorded changes when a batch fails. The `scene_change_plan` and `apply_scene_change` pair adds preflight checks, an expiring plan, atomic scene edits, optional verification, and optional saving.

## Setup and configuration

Requirements include Unity 6 (`6000.0` or newer), Git 2.14 or newer on `PATH`, and `uv`. Running through `uvx` does not require a separate Python installation. Optional Codex skill synchronization and source-checkout setup require Python 3.14 or newer.

Install the Unity package with **Window > Package Manager > + > Add package from git URL**, using:

```text
https://github.com/german-krasnikov/unity-biome-mcp.git?path=unity-plugin
```

Open **MCP > Setup Wizard** in Unity, select the client, and follow its generated instructions. Supported configuration helpers include Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Codex, Kimi, Junie, and OpenCode. OpenCode requires its dedicated configuration format rather than the standard clipboard JSON.

## Tools and capabilities

- Inspect hierarchies, search scene objects, inspect multiple components, and validate references.
- Create, delete, rename, activate, reparent, and edit GameObjects and components.
- Open, save, copy, discard, and manage multiple scenes.
- Run PlayTest DSL scripts and suites with assertions, snapshots, console checks, traces, captures, and lifecycle controls.
- Preflight C#, await compilation, execute editor C#, query console records, and run Unity tests.
- Group scene and editor operations with batch execution, stop-on-error handling, or Undo-based rollback.
- Capture scene or game views with framing, highlighting, annotations, and optional descriptions.

## Limitations and notes

`execute_code` runs C# in the Unity Editor and is not sandboxed; its source-pattern security scan is configurable and defaults to AllowAll. Play Mode and Edit Mode use different mutation paths: Play Mode changes should use runtime-oriented tools such as `invoke_method` or `execute_code`, while serialized scene edits use editor tools.

Deletion does not require confirmation, and deleting non-empty containers requires `force=True`. PlayTest failures return the complete report as a tool error, while suite lifecycle failures stop the suite. The screenshot tool cannot capture ScreenSpaceOverlay canvas content in Edit Mode through the camera pipeline; switching to ScreenSpace-Camera, using Play Mode, or using `scene_view` provides alternatives.

The setup wizard configures an integration but does not perform an end-to-end connection test. Keep the Unity project open when verifying an external client connection.

_Full upstream README: https://allmcps.com/mcp/german-krasnikov-unity-biome-mcp/readme_

