Unity-MCP connects AI coding agents to the Unity game engine through MCP, letting them work with the Unity Editor and running games. It is used by game developers to generate code, automate development and testing, debug projects, and add AI-driven behavior to games. The catalogue entries provide skills, instructions, an MCP integration, and settings for operating this workflow.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add IvanMurzak/Unity-MCP --skill script-executegit clone --depth 1 https://github.com/IvanMurzak/Unity-MCPWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ivanmurzak/unity-mcp/script-execute)<a href="https://agentmods.dev/skills/ivanmurzak/unity-mcp/script-execute"><img src="https://agentmods.dev/badge/skills/ivanmurzak/unity-mcp/script-execute/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/ivanmurzak/unity-mcp/script-execute"><img src="https://agentmods.dev/badge/skills/ivanmurzak/unity-mcp/script-execute.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium MCP Rug Pull · line 50 npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.Fix: Pin the version: npx @scope/[email protected]
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00053 | $0.01922 |
| Opus 5.5 | $0.00021 | $0.00769 |
| Sonnet 5.5 | $0.00011 | $0.00384 |
| Haiku 4.5 | $0.00005 | $0.00192 |
Grade A, and why
script-execute scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 223 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Script / Execute
Modes
- Snippet (default): plain statements. The last expression is the result (
GameObject.Find("Player").name). Ownusinglines, local classes and functions are allowed;awaitworks. Usings for System, LINQ, UnityEngine, UnityEditor and AIGD are already there; an unknown type name is imported automatically when exactly one namespace has it. - Full code: when
csharpCodedeclares classclassNamewith a static methodmethodName, that method runs. isMethodBody=trueforces snippet mode.
Compile errors point at your own lines (snippet.cs(2,5)).
usings / include
usings: extra namespaces, e.g.["MyGame.Gameplay"].include: helper.csfiles or folders (recursive), relative to<Project>/.ai-game-dev/snippets, compiled with the snippet.
Passing Unity objects as parameters
Parameters become the snippet's variables (or the method's arguments, in order):
UnityEngine.GameObject— resolves an actual GameObject from value{"instanceID": N},{"name": "..."}, or{"path": "..."}.UnityEngine.Component(or any component subtype) — resolves from{"instanceID": N}.AIGD.GameObjectRef— passes aGameObjectRefPOCO directly; callgoRef.FindGameObject()to resolve it.AIGD.ComponentRef— passes aComponentRefPOCO.AIGD.ObjectRef— passes a baseObjectRefPOCO.
How to Call
unity-mcp-cli run-tool script-execute --input '{
"csharpCode": "string_value",
"className": "string_value",
"methodName": "string_value",
"parameters": "string_value",
"isMethodBody": false,
"usings": "string_value",
"include": "string_value"
}'
For complex input (multi-line strings, code), save the JSON to a file and use:
unity-mcp-cli run-tool script-execute --input-file args.jsonOr pipe via stdin (recommended):
unity-mcp-cli run-tool script-execute --input-file - <<'EOF' {"param": "value"} EOF
Troubleshooting
If unity-mcp-cli is not found, either install it globally (npm install -g unity-mcp-cli) or use npx unity-mcp-cli instead.
Read the /unity-initial-setup skill for detailed installation instructions.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday Changed · +24 lines · +5 tokens per session b6023fd476fe
- 4d ago Changed · +2 lines 9064ef9860f9
- 1mo ago First seen · 197 lines · 48 tokens per session scan A 00b38c73fb05
script-execute is a skill published in the GitHub repository IvanMurzak/Unity-MCP (4,501 stars, last pushed today), licensed Apache-2.0. It adds 53 tokens to every session and 1,922 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
godot-csharp
Use C#/.NET in Godot 4.7: partial classes extending nodes, the PascalCase lifecycle (Ready/Process/PhysicsProcess), [Export] fields, [Signal] delegates as C# events, type-safe node lookup, and calling between C# and GDScript. Use when writing Godot game code in C# (.cs files, .csproj), needing the Godot .NET build…
unity-csharp-scripting
Write Unity 6.3 LTS C# gameplay scripts: the MonoBehaviour lifecycle (Awake/OnEnable/Start/Update/FixedUpdate/LateUpdate), GameObject and component access, coroutines, and Inspector serialization. Use when creating or editing .cs scripts in a Unity project, or when the user mentions MonoBehaviour, Start/Update…
gdextension
Use when building native extensions for Godot — godot-cpp (C++) or gdext (Rust), binding classes, building, and GDScript/C# interop.
godot-csharp-patterns
Use C# in Godot with clear interop boundaries, node ownership, and engine lifecycle awareness.
fantasy-net
This guide applies to development and code review for Fantasy / Fantasy.Net / Fantasy.Unity written in C#. Use it when a task involves Fantasy server code or Unity client code using Fantasy, ECS entities/components/systems, scenes and subscenes, FTask, network handlers/messages/protocols, Address or Roaming routing…
sbox
Use when writing or modifying code for s&box, sbox, the Facepunch sandbox engine, or any Source 2 game project in C#. Triggers on mentions of s&box, sbox, sandbox game, Facepunch engine, Source 2 game, .sbproj, .razor with PanelComponent, @inherits PanelComponent, Sandbox.Component, GameObject + Components.Get …