
A high-performance Unity MCP with extensible APIs for agentic tools.
A high-performance Unity MCP with extensible APIs for agentic tools.
·
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.
MCP Host <-- stdio --> Patina Server <-- local TCP --> Unity EditorThe 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.
In Unity, open Project Settings > Package Manager, add a scoped registry, then install the package by name.
Scoped registry:
| Field | Value |
|---|---|
| Name | npmjs |
| URL | https://registry.npmjs.org |
| Scope(s) | com.taygunsavas |
Then open the Package Manager (Window > Package Manager), click the + icon in the top left, select Add package by name..., and enter:
com.taygunsavas.patina-unity-mcpRegistry 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:
https://github.com/taygunsavas/patina-unity-mcp.git?path=/unity-packagePatina 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.
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.
Open your MCP host and try:
Patina keeps the advertised MCP surface compact so hosts do not need to load every Unity command schema into context. Agents should use:
| MCP tool | What it does |
|---|---|
patina_capabilities | Search or browse the Unity command catalog; request schemas only for specific commands |
patina_call | Execute a catalog command with JSON parameters |
patina_health | Inspect Patina version, command count, bridge port, optional Unity editor state, and bridge diagnostics |
The 87 commands below are available through patina_capabilities and patina_call.
| Tool | What it does |
|---|---|
get_hierarchy | Retrieve the active scene's GameObject tree as nested JSON; supports max_depth and name_filter |
get_scene_info | Active scene metadata (name, path, build index, root count, dirty state); pass include_all_scenes for all loaded scenes |
open_scene | Open a scene by project-relative path; mode single (default) or additive |
save_scene | Save the active scene or any loaded scene; supports Save As |
new_scene | Create and save a new scene with optional empty or default-game-objects setup |
| Tool | What it does |
|---|---|
create_game_object | Spawn an empty GameObject or a built-in primitive (Cube, Sphere, Capsule, Cylinder, Plane, Quad) |
delete_game_object | Permanently delete a GameObject and all its children |
duplicate_game_object | Duplicate a GameObject and its children |
reparent_game_object | Move a GameObject under a new parent; pass null to promote to scene root |
get_game_object_info | Full details for a named GameObject: transform, tag, layer, and all component properties |
set_active_state | Show or hide a GameObject via SetActive() |
set_tag | Set the tag on a GameObject (tag must be registered in Tags & Layers) |
set_layer | Set the layer by name; optionally apply to all children |
set_transform | Set position, rotation (Euler), and/or scale in world or local space in one call |
| Tool | What it does |
|---|---|
add_component | Add a component by short name (Rigidbody) or fully qualified name |
remove_component | Remove a component by type name |
set_property | Set a public field, a public writable property or a [SerializeField] field (including inherited ones) on a component by name |
get_game_object_components | Return a lightweight component list for a GameObject |
| Tool | What it does |
|---|---|
batch_set_properties | Apply set_property style changes (public members or [SerializeField] fields) across multiple GameObjects |
batch_add_components | Add components to multiple GameObjects |
batch_set_transform | Apply transform changes to multiple GameObjects |
| Tool | What it does |
|---|---|
create_prefab | Save a scene GameObject as a prefab asset |
instantiate_prefab | Instantiate a prefab into the scene at an optional world position |
get_prefab_info | Inspect a prefab asset or scene instance; returns asset type, overrides list, and instance status |
unpack_prefab | Sever a prefab instance link; outermost (default) or completely |
apply_prefab_overrides | Apply all instance overrides back to the source prefab asset on disk |
revert_prefab_overrides | Restore a prefab instance to match its source asset |
list_prefab_components | List component types and instance IDs on a prefab asset; optionally includes child GameObjects with transform paths |
edit_prefab_asset | Perform a batch of edit operations (add/remove component, add/remove child, set field) on a prefab asset, including object-reference fields and GameObject-level layer, tag, isStatic, name and activeSelf; after saving, runs OnValidate on touched components and saves again |
open_prefab_stage | Open a prefab asset in Unity's prefab stage for editing; exit using close_prefab_stage |
close_prefab_stage | Close the active prefab stage; save_changes parameter resolves dirty stages without Unity's blocking save prompt, giving save or discard decision |
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:
{
"asset_path": "Assets/Prefabs/MyPrefab.prefab",
"actions": [
{"action_type": "add_child", "child_name": "Wall0", "layer": "Water", "tag": "Player", "is_static": true},
{"action_type": "set_field", "transform_path": "Wall0", "component_type": "UnityEngine.GameObject", "field_name": "layer", "value": 5}
]
}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:
{
"asset_path": "Assets/Prefabs/MyPrefab.prefab",
"actions": [
{
"action_type": "set_field",
"component_type": "MyNamespace.MyComponent",
"field_name": "targetReference",
"value": {"transform_path": "Container/Button", "component_type": "MyNamespace.TargetComponent"}
}
]
}| Tool | What it does |
|---|---|
find_assets_by_type | Search the Asset Database by type filter (t:Material, t:Prefab, t:Texture2D, etc.) |
find_assets_by_name | Search the Asset Database by partial name match |
get_asset_info | Metadata for an asset: GUID, type, file size, labels, and importer settings |
create_folder | Create a new folder in the Asset Database |
move_asset | Move an asset to a new project-relative path |
rename_asset | Rename an asset in-place |
delete_asset | Delete an asset by project-relative path |
refresh_asset_database | Trigger AssetDatabase.Refresh; incremental or force-reimport |
set_asset_labels | Replace the full label list on an asset |
| Tool | What it does |
|---|---|
create_material | Create a new Material asset; defaults to URP/Lit |
get_material_properties | Read all exposed shader properties with names, types, and current values |
set_material_property | Set a shader property (float, bool, color, vector, or texture path) |
assign_material | Assign a Material to a specific Renderer slot |
| Tool | What it does |
|---|---|
create_script | Create a new C# script from a template (monobehaviour, scriptableobject, editor_window, plain_class, interface) or verbatim content |
resolve_script_type | Resolve a MonoScript GUID and asset path by its fully qualified C# type |
force_recompile | Trigger a Unity script recompile via AssetDatabase.Refresh(ForceUpdate) |
compile_and_get_errors | Trigger script recompile and return compiler errors only; also returns compilationRan, domainReloadObserved, and reloadCount |
get_compilation_errors | Get the list of current compiler errors and warnings |
get_script_content | Read the content of a script file in the project |
get_assembly_types | List all types declared in a specific assembly |
request_script_reload | Request a domain reload via EditorUtility.RequestScriptReload() and return once it completes, enabling observation of reload-time errors |
| Tool | What it does |
|---|---|
get_scriptable_object | Read serialized fields from a ScriptableObject asset |
set_scriptable_object_field | Set one serialized ScriptableObject field |
| Tool | What it does |
|---|---|
validate_scene | Scan the active scene for quality issues (missing script references, null serialized fields, and broken prefab connections) |
validate_assets | Validate a single prefab asset or a folder recursively for missing scripts, broken object references, and unassigned required serialized fields |
get_scene_stats | Return lightweight statistics for the active scene (object count, component count, unique type counts, max depth, etc.) |
| Tool | What it does |
|---|---|
find_game_objects_by_tag | Find all active GameObjects with a given tag |
find_game_objects_by_component | Find all scene objects that have a given component type |
find_game_objects_by_layer | Find all scene objects on a given layer by name |
query_game_objects | Find GameObjects matching compound filters |
find_game_objects_by_path | Find GameObjects by hierarchy path prefix |
| Tool | What it does |
|---|---|
log_to_console | Emit a message to the Unity Console (info, warning, or error) |
get_console_logs | Read buffered console entries with per-entry phase field (normal, reloadTeardown, reloadStartup); filterable by type, capped by max_results; includes reloadWindowEntryCount |
clear_console | Clear all console log entries |
| Tool | What it does |
|---|---|
get_editor_state | Current editor flags and main-thread responsiveness; returns a limited blocked state with blockedByModalDialogLikely if Unity is not processing editor updates |
get_project_settings | Read-only snapshot of key project settings (version, build target, color space, physics gravity, etc.) |
set_play_mode | Enter, exit, pause, unpause, or step play mode |
execute_menu_item | Execute any Editor menu item by full path (e.g. Assets/Refresh) |
get_selection | Return the current Editor selection (scene objects and/or asset paths) |
set_selection | Set the Editor selection to specific GameObjects and/or asset paths |
| Tool | What it does |
|---|---|
begin_undo_group | Open a named Unity Undo group |
end_undo_group | Collapse operations into the current Undo group |
undo | Perform one or more Undo steps |
redo | Perform one or more Redo steps |
get_undo_stack | Return current Undo and Redo stack entry names |
| Tool | What it does |
|---|---|
get_build_settings | Build Settings snapshot: active target, scripting backend, and full scene list |
set_build_scenes | Replace the Build Settings scene list with an ordered list of scene paths |
get_player_settings | Read Player Settings for a build target group (Standalone, Android, iOS, WebGL) |
set_player_settings | Write Player Settings fields; only non-null fields are changed |
set_build_target | Switch the active build target (blocks the main thread on large projects) |
| Tool | What it does |
|---|---|
run_tests | Start a Unity Test Runner execution. filter is a case-sensitive substring of a test name or full name; a filter matching no tests returns an error. The response includes runId and matchedCount (null when no filter is given) |
get_test_results | Return results from the most recent test run, with runId, startedAt and finishedAt. A domain reload during a run resets them to null with empty results, which means the run was lost |
get_test_list | List available Unity tests |
| Tool | What it does |
|---|---|
get_animator_info | Read Animator Controller parameters and state information |
set_animator_parameter | Set an Animator parameter in play mode |
list_animation_clips | List AnimationClip assets in the project |
| Host | Setup |
|---|---|
| Antigravity CLI (agy) | Automatic |
| Claude Code (Anthropic CLI) | Automatic (~/.claude.json) |
| Claude Desktop | Automatic |
| Cursor | Automatic |
| Visual Studio Code | Automatic |
| GitHub Copilot (VS Code) | Linked via VS Code config |
| Gemini CLI | Automatic |
| JetBrains Rider / Junie | Automatic |
| Codex CLI | Automatic |
The setup window also detects stale entries, missing hosts, and provides a clean Remove Patina From Hosts action.
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}.
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}.
| Phase | Focus |
|---|---|
| Phase 1 ✓ | Core tools: console, hierarchy, object creation |
| Phase 2 ✓ | Expanded coverage: scene management, asset operations, component editing |
| Phase 3 (current) | Distribution and reach: Git URL installation docs, package layout, release pipeline |
Use this when you are editing unity-package/ or rust-server/ directly from the repository:
file:<your-clone-path>/unity-packagecd rust-server && cargo build --release# Windows
pwsh -File scripts/publish-dev-runtime.ps1# macOS / Linux
./scripts/publish-dev-runtime.shThis 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.
Use this when you want to test the package as it will be published, not the raw source checkout:
pwsh -File scripts/stage-local-upm.ps1Then add the staged package from disk in Unity:
dist/local-upm/com.taygunsavas.patina-unity-mcp/package.jsonPrefer 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.
main are expected to pass CI and go through CODEOWNERS + Copilot review once repository rules are enabled.This repo does not document an install step we could read. Check the README on GitHub.
Paste this prompt into your agent. It reads this page and does the setup for you.
Read https://aiagentslisting.com/mcp/patina to learn what the "Patina" MCP server does and how to install it. Add it to my coding agent's MCP configuration as documented on that page, then confirm the server connects and list the tools it exposes.Agents can also browse this directory over MCP at https://aiagentslisting.com/api/mcp
This server doesn't publish a machine-readable tool manifest, and it doesn't expose a public endpoint we could ask. Connect the server locally to see what it exposes.
We could not run this server: it ships no npx package for our sandbox and no public endpoint. The four checks that need a live server are left out, and the grade tops out at B until one exists.
Maintain this server? Claiming proves you own the listing and earns the last 4 points.
Claim this listingPaste this line near the top of your repository's README. The badge always renders the current score.
[](https://aiagentslisting.com/mcp/patina)Nothing comparable is listed yet.
v1.2.2Release notesv1.2.1Release notesv1.2.0Release notesv1.1.15Release notesv1.1.14Release notesv1.1.13Release notesv1.1.12Release notesv1.1.11Release notesv1.1.10Release notesv1.1.9Release notesv1.1.8Release notesv1.1.7Release notesv1.1.6Release notesv1.1.5Release notesv1.1.4Release notesv1.1.3Release notesv1.1.2Release notesv1.1.1Release notesv1.1.0Release notesv1.0.0Release notesConnect to the AI Agents Listing MCP server at https://aiagentslisting.com/api/mcp using the HTTP transport and complete the sign-in when it asks. Then call the submit_review tool for the listing "patina" with a rating from 1 to 5 and a short note on what worked and what did not.No reviews yet
Be the first to share your experience with this tool.
One email a week. New agents, MCP servers and skills, and what is actually getting traction.