
Patina Unity MCP
io.github.taygunsavasPublished by GitHub account taygunsavasv1.2.2Updated Oct 24, 2026
Control the Unity Editor from MCP hosts through a local Rust server and C# Unity bridge.
Overview
Connects an AI assistant to the Unity Editor, letting it inspect scenes, create and edit GameObjects, prefabs, assets and scripts, and read the console.
- What you can do
- Inspect and manage scenes: read the hierarchy and scene info, open, save and create scenes, and query GameObjects by tag, component, layer, path or compound filters, plus scene stats and validation checks for missing scripts and broken references. Create, delete, duplicate, reparent and transform GameObjects, and add, remove or set components and their properties, including batch operations across many objects. Work with prefabs: create, instantiate, inspect, unpack, apply or revert overrides, edit prefab assets, and open or close the prefab stage. Manage assets and materials: search the Asset Database, create folders, move, rename, delete, label and refresh assets, and create or edit shader
- When to use it
- Useful when you want an assistant to build or inspect Unity scenes and prefabs, wire up components and materials, write and compile C# scripts, run tests, or read compiler and console output without switching to the Editor by hand.
- Requirements
- A local process on the user's machine, desktop only. Needs Unity 6 (6000.3 LTS or later) with the Patina UPM package installed, a supported MCP host, and the one-click setup run from the Unity window. Pre-built Rust binaries ship with the package; Rust 1.75+ is needed only for contributors. Communication uses a local loopback TCP bridge.
Installation
In SourceWeft
- Open Patina Unity MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Patina
[npm version] [MCP Registry] [Glama MCP server] [Indexed on TensorBlock MCP Index] [License: MIT]
Control the Unity Editor from any MCP host. One package install, one click, and your AI assistant can see your scene, create objects, and talk to the console.
Patina is a Rust MCP server paired with a C# Unity bridge. It connects your favorite AI coding tool directly to the Unity Editor over a local TCP channel, with zero manual config.
Why Patina?
- One-click setup. Install the UPM package, click a button, and every supported host is configured automatically.
- No Rust required. Release packages ship pre-built binaries for Windows, Linux, and macOS. Just install and go.
- Built for speed. The Rust sidecar keeps the MCP layer fast and lightweight while Unity stays on the main thread.
- Multi-host. Works with Claude Code, Cursor, VS Code, Gemini CLI, JetBrains Rider, Codex CLI, and more.
How It Works
The host launches the Rust binary over stdio MCP. The Rust server forwards tool calls into Unity through a local loopback TCP bridge. Unity executes them on the main thread and returns the result.
Quick Start
1. Install the Unity package
In Unity, open Project Settings > Package Manager, add a scoped registry, then install the package by name.
Scoped registry:
Then open the Package Manager (Window > Package Manager), click the + icon in the top left, select Add package by name..., and enter:
Registry releases are signed during the release workflow for Unity Package Manager verification.
Alternatively, open the Package Manager, click the + icon, select Add package from git URL..., and enter:
Patina is distributed as a complete Unity package artifact with the editor code, native Rust runtime binaries under Plugins/<platform>/, and the Unity metadata needed for import. End users do not need the Rust toolchain or a Git checkout of this repository.
2. Run One-Click Setup
Open Window > Patina Unity MCP and click One-Click Setup.
The setup flow verifies the binary, starts the Unity bridge, auto-configures every detected host, replaces stale entries, and shows restart guidance where needed.
Patina writes host configs to a stable user-level runtime path instead of a per-project Unity package cache path. When the package is updated, the Unity editor package refreshes that managed runtime automatically, so supported MCP hosts do not need to be reconfigured just because the package cache path changed.
3. Start building
Open your MCP host and try:
- "Log hello to Unity console"
- "Show me the scene hierarchy"
- "Create a cube at position 0, 2, 0"
Available Capabilities
Patina keeps the advertised MCP surface compact so hosts do not need to load every Unity command schema into context. Agents should use:
The 87 commands below are available through patina_capabilities and patina_call.
Scene
GameObjects
Components & Properties
Batch Operations
Prefabs
After saving and reimporting, edit_prefab_asset runs OnValidate by reflection on the saved asset for every component of each type touched by add_component or set_field on the touched GameObject, then saves again, so state computed there (such as Netcode NetworkObject hashes) is persisted. If an OnValidate throws, the command still succeeds and the result gains a warnings string array listing components whose OnValidate was skipped or threw, including when the saved prefab cannot be loaded or a tracked path or component cannot be resolved.
Example: Set GameObject-level values.
set_field targets the GameObject itself when component_type is omitted, "GameObject" or "UnityEngine.GameObject". Supported field_name values are layer (index 0-31 or layer name), tag, isStatic, name and activeSelf (the prefab root name follows the asset file name, so name on the root is rejected). add_child also accepts optional layer, tag and is_static:
Example: Set a component reference within a prefab.
To point a serialized field at another component inside the same prefab, pass an edit_prefab_asset action with set_field and an object reference value. The transform_path inside value is resolved against the prefab root, not against the action's own transform_path:
Assets
Materials
Scripts
Scriptable Objects
Validation & Health
Search & Query
Console
Editor State & Control
Undo
Build & Player Settings
Test Runner
Animation
Supported Hosts
The setup window also detects stale entries, missing hosts, and provides a clean Remove Patina From Hosts action.
Troubleshooting
If a Patina call reports EDITOR_BLOCKED, or mentions that Unity may be waiting on a modal dialog, check the Unity Editor for a save-changes prompt or other blocking popup. Patina cannot safely run queued editor commands while Unity is waiting for user input. Resolve the Unity prompt, then retry the MCP command or run patina_health with {"include_unity_state": true}.
Prefab Stage Save Dialogs
Patina addresses dirty prefab stages by responding to the save question programmatically rather than blocking on a modal. When you call close_prefab_stage, the save_changes parameter directly determines the outcome: true saves, false (default) discards changes. This applies only to that command call and does not alter Editor behavior when a human is working manually.
Once a modal dialog appears, Unity's main thread is blocked and remains blocked until a human closes it. Every queued command processes through the same blocked thread, so prevention is the only real solution. For agent-written editor scripts, the safe pattern is to write prefabs using PrefabUtility.LoadPrefabContents, apply changes to a SerializedObject, save with PrefabUtility.SaveAsPrefabAsset, then PrefabUtility.UnloadPrefabContents. This approach never opens a prefab stage. If a stage must be opened, close it with close_prefab_stage. Leaving a dirty stage and manually calling StageUtility.GoToMainStage() will lock the Editor.
Unity offers a startup flag, -automated, which disables dialogs process-wide. While this may be suitable for an Editor driven entirely by agents, it creates problems in hybrid workflows where a human and agent share the same Editor: unsaved changes trigger no prompts, and some operations silently cancel. Patina does not require -automated. Per-command dialog answering works reliably without it and behaves correctly even in an Editor opened with -automated.
To check the current Editor state and dialog automation status, call patina_health and examine broker.sessions[].automated in the default output, or isAutomatedMode and dialogAutomationAvailable when passing {"include_unity_state": true}.
Roadmap
Local Development
Contributor source checkout
Use this when you are editing unity-package/ or rust-server/ directly from the repository:
- Point Unity at the local package checkout.
file:<your-clone-path>/unity-package
- Build the Rust server.
- Publish the current binary into the local development runtime path.
- In Unity, open Window > Patina Unity MCP, enable Use Local Runtime (Contributor), and click One-Click Setup.
This writes host configs against the local dev runtime instead of the managed packaged runtime. Re-run One-Click Setup after every new cargo build --release + publish-dev-runtime pass, and use Remove Patina From Hosts before switching back to the packaged flow.
Stage a local UPM test package
Use this when you want to test the package as it will be published, not the raw source checkout:
Then add the staged package from disk in Unity:
dist/local-upm/com.taygunsavas.patina-unity-mcp/package.json
Prefer the staged local package when you are validating package layout, import behavior, or release packaging. Prefer the source checkout path when you are actively editing source and want the fastest edit-build-run loop.
See CONTRIBUTING.md for the full contributor workflow.
Community and Contributing
- Start with CONTRIBUTING.md for the local development loop, validation expectations, and pull request guidance.
- Use GitHub issue forms for reproducible bugs, feature proposals, and usage questions so maintainers get the context they need.
- Read .github/SUPPORT.md before opening a help request.
- Read .github/SECURITY.md for private vulnerability reporting.
- Read .github/CODE_OF_CONDUCT.md before participating in issues and pull requests.
- Pull requests targeting
mainare expected to pass CI and go through CODEOWNERS + Copilot review once repository rules are enabled.
Requirements
- Unity 6 (6000.3 LTS+)
- A supported MCP host
- Rust 1.75+ (contributors only)
License
Source: README.md at commit b98b9ee
Tools
0Version history
2- v1.2.2LatestOct 12, 2026
- v1.2.1Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts