Patina Unity MCP
Controls the Unity Editor by providing tools for scene management, GameObject manipulation, asset operations, script handling, and more, allowing AI agents to interact with Unity directly.
Patina
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.
Related MCP server: Unity API Communicator MCP Server
How It Works
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.
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:
Field | Value |
Name |
|
URL |
|
Scope(s) |
|
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-mcpAlternatively, 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.
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.
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:
MCP tool | What it does |
| Search or browse the Unity command catalog; request schemas only for specific commands |
| Execute a catalog command with JSON parameters |
| Inspect Patina version, command count, bridge port, and optional Unity editor state |
The 86 commands below are available through patina_capabilities and patina_call.
Scene
Tool | What it does |
| Retrieve the active scene's GameObject tree as nested JSON; supports |
| Active scene metadata (name, path, build index, root count, dirty state); pass |
| Open a scene by project-relative path; |
| Save the active scene or any loaded scene; supports Save As |
| Create and save a new scene with optional empty or default-game-objects setup |
GameObjects
Tool | What it does |
| Spawn an empty GameObject or a built-in primitive (Cube, Sphere, Capsule, Cylinder, Plane, Quad) |
| Permanently delete a GameObject and all its children |
| Duplicate a GameObject and its children |
| Move a GameObject under a new parent; pass |
| Full details for a named GameObject: transform, tag, layer, and all component properties |
| Show or hide a GameObject via |
| Set the tag on a GameObject (tag must be registered in Tags & Layers) |
| Set the layer by name; optionally apply to all children |
| Set position, rotation (Euler), and/or scale in world or local space in one call |
Components & Properties
Tool | What it does |
| Add a component by short name ( |
| Remove a component by type name |
| Set any serialized property on a component using its SerializedObject path |
| Return a lightweight component list for a GameObject |
Batch Operations
Tool | What it does |
| Apply serialized property changes across multiple GameObjects |
| Add components to multiple GameObjects |
| Apply transform changes to multiple GameObjects |
Prefabs
Tool | What it does |
| Save a scene GameObject as a prefab asset |
| Instantiate a prefab into the scene at an optional world position |
| Inspect a prefab asset or scene instance; returns asset type, overrides list, and instance status |
| Sever a prefab instance link; |
| Apply all instance overrides back to the source prefab asset on disk |
| Restore a prefab instance to match its source asset |
| List component types and instance IDs on a prefab asset |
| Perform a batch of edit operations (add/remove component, add/remove child, set field) on a prefab asset |
| Open a prefab asset in Unity's prefab stage for editing |
| Close Unity's current active prefab stage, optionally saving changes |
Assets
Tool | What it does |
| Search the Asset Database by type filter ( |
| Search the Asset Database by partial name match |
| Metadata for an asset: GUID, type, file size, labels, and importer settings |
| Create a new folder in the Asset Database |
| Move an asset to a new project-relative path |
| Rename an asset in-place |
| Delete an asset by project-relative path |
| Trigger |
| Replace the full label list on an asset |
Materials
Tool | What it does |
| Create a new Material asset; defaults to URP/Lit |
| Read all exposed shader properties with names, types, and current values |
| Set a shader property (float, bool, color, vector, or texture path) |
| Assign a Material to a specific Renderer slot |
Scripts
Tool | What it does |
| Create a new C# script from a template ( |
| Resolve a MonoScript GUID and asset path by its fully qualified C# type |
| Trigger a Unity script recompile via |
| Trigger script recompile and return compiler errors only |
| Get the list of current compiler errors and warnings |
| Read the content of a script file in the project |
| List all types declared in a specific assembly |
Scriptable Objects
Tool | What it does |
| Read serialized fields from a ScriptableObject asset |
| Set one serialized ScriptableObject field |
Validation & Health
Tool | What it does |
| Scan the active scene for quality issues (missing script references, null serialized fields, and broken prefab connections) |
| Validate a single prefab asset or a folder recursively for missing scripts, broken object references, and unassigned required serialized fields |
| Return lightweight statistics for the active scene (object count, component count, unique type counts, max depth, etc.) |
Search & Query
Tool | What it does |
| Find all active GameObjects with a given tag |
| Find all scene objects that have a given component type |
| Find all scene objects on a given layer by name |
| Find GameObjects matching compound filters |
| Find GameObjects by hierarchy path prefix |
Console
Tool | What it does |
| Emit a message to the Unity Console ( |
| Read buffered console entries; filterable by type, capped by |
| Clear all console log entries |
Editor State & Control
Tool | What it does |
| Current editor flags: |
| Read-only snapshot of key project settings (version, build target, color space, physics gravity, etc.) |
| Enter, exit, pause, unpause, or step play mode |
| Execute any Editor menu item by full path (e.g. |
| Return the current Editor selection (scene objects and/or asset paths) |
| Set the Editor selection to specific GameObjects and/or asset paths |
Undo
Tool | What it does |
| Open a named Unity Undo group |
| Collapse operations into the current Undo group |
| Perform one or more Undo steps |
| Perform one or more Redo steps |
| Return current Undo and Redo stack entry names |
Build & Player Settings
Tool | What it does |
| Build Settings snapshot: active target, scripting backend, and full scene list |
| Replace the Build Settings scene list with an ordered list of scene paths |
| Read Player Settings for a build target group (Standalone, Android, iOS, WebGL) |
| Write Player Settings fields; only non-null fields are changed |
| Switch the active build target (blocks the main thread on large projects) |
Test Runner
Tool | What it does |
| Start a Unity Test Runner execution |
| Return results from the most recent test run |
| List available Unity tests |
Animation
Tool | What it does |
| Read Animator Controller parameters and state information |
| Set an Animator parameter in play mode |
| List AnimationClip assets in the project |
Supported Hosts
Host | Setup |
Antigravity CLI (agy) | Automatic |
Claude Code (Anthropic CLI) | Automatic ( |
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.
Roadmap
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 |
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.
cd rust-server && cargo build --releasePublish the current binary into the local development runtime path.
pwsh -File scripts/publish-dev-runtime.ps1In 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 packaged binary. 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:
pwsh -File scripts/stage-local-upm.ps1Then 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
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/taygunsavas/patina-unity-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server