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 agentmods add skills/pakkio/mcp-unity/mcp-unity-devnpx skills add pakkio/mcp-unity --skill mcp-unity-devgit clone --depth 1 https://github.com/pakkio/mcp-unityWhat 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 | $0.00123 | $0.02242 |
| Opus 5 | $0.00062 | $0.01121 |
| Sonnet 5 | $0.00025 | $0.00448 |
| Haiku 4.5 | $0.00012 | $0.00224 |
Grade A, and why
mcp-unity-dev 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 2d ago.
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 — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.
mcp-unity development notes
Hard-won knowledge from actually using and extending mcp-unity in this repo. Read the section relevant to your task before you start, not after you hit the bug.
If you're modifying the mcp-unity package itself
The Unity project that actually runs this code (My project (1)) pulls it as a git package, not a local reference — editing files in this repo does nothing to the running Unity Editor until you:
- Edit the C# (
Editor/Tools/*.cs,McpUnityServer.cs) and/or TypeScript (Server~/src/tools/*.ts,index.ts) - New
.csfiles need a.metafile — Unity treats git packages as immutable and silently drops any asset without one (no error, the type just doesn't exist, giving a confusingCS0246in an unrelated file). Generate a GUID (powershell -Command "[guid]::NewGuid().ToString('N')") and write the meta in the same format as a sibling file. cd Server~ && npm run buildto catch TypeScript errors- Commit (no AI co-author line — this user's preference), push to
origin/main - In Unity: Package Manager → In Project → MCP Unity → Update (or remove/re-add if no Update button). This triggers a domain reload.
- Verify via
get_console_logs— check thePackageCachefolder hash in any log line matches your new commit SHA, and confirm no compile errors before using the new tool.
Tool registration is two-sided and easy to half-do: a new tool needs a Unity McpToolBase subclass registered in McpUnityServer.cs RegisterTools(), and a Node registerXTool() in Server~/src/tools/*.ts registered in index.ts. Forgetting either side gives a confusing "tool not found" or silently does nothing.
Tool gotchas (don't rediscover these empirically)
reparent_gameobjectdoes not reorder the Hierarchy. It changes parent only; Unity'sSetParentis a no-op for sibling index when the parent is unchanged, and even a genuine temp-parent bounce doesn't reliably reorder. Useset_sibling_indexinstead (absolutesiblingIndex, orinsertAfterInstanceId/insertBeforeInstanceIdrelative to a sibling).duplicate_gameobjecton a nested child under a scaled/rotated parent used to corrupt the clone's transform. Fixed by instantiating with the parent specified directly (Instantiate(original, parent)) instead of parentless-then-reparent. If you ever see a duplicate land at a wildly wrong position/rotation/scale, this is the failure mode to suspect.- Component fields that reference other scene objects (a
Transform,Rigidbody, or anotherComponent) go throughupdate_component'scomponentDatausing{"instanceId": N}or{"objectPath": "Parent/Child"}— not{"path": ...}/{"guid": ...}, which are asset-only (AssetDatabase). If the target field type doesn't match the resolved object directly (e.g. field isRigidbodybut you passed the GameObject's ID), it falls back toGetComponentautomatically.List<T>/array fields accept a JSON array of the same per-element shapes. Collider-derived components (includingWheelCollider) are read viaSerializedObject, not reflection. They used to be fully skipped ("_skipped": "Detailed property serialization skipped for safety") because some of their reflected C# properties are native-backed getters that can crash the Editor.get_gameobject/get_gameobjectresource now dump these via the sameSerializedObject/SerializedPropertyAPIupdate_componentalready trusts for writes, soradius,isTrigger,suspensionSpring, etc. read back correctly. Native-plugin components (Pathfinding/FMOD namespaces) are still fully skipped — that skip is unrelated and still necessary.set_play_mode_status action:"play"/"stop"used to frequently return"Connection failed"or time out. Root cause: entering/exiting Play mode synchronously firesExitingEditMode, which unconditionally closes the WebSocket (StopServer) — this could race the in-flight response, and separately, the Node bridge used to reject all pending requests on any transient WebSocketerrorevent (not just a terminal disconnect), which fired on the same reset. Both are fixed: Unity defers the actual mode transition to the next editor tick (viaEditorApplication.delayCall) so the response is queued to send first, and Node no longer rejects pending requests on a bare connection error — only on a genuinely terminal disconnect. The action should now resolve normally without a manualsleep-and-poll workaround.- Unity discards all runtime changes to existing scene objects when you exit Play mode (auto-revert to the edit-time saved state). If you need to inspect what happened during a Play session, query while still in Play mode — don't stop first.
- GameObject lookup by
instanceId/objectPathnow goes through one shared resolver (Editor/Utils/GameObjectResolver.cs) used by every tool. It searches all loaded scenes and includes inactive objects, and a bare name that matches more than one object returns anambiguous_reference_errorlisting every candidate instead of silently picking one. Previously, whether an inactive object or an object in a non-active loaded scene could be found at all depended on which specific tool you called (four independent, disagreeing implementations existed) — that's no longer the case. - Prefer
batch_executefor any run of >2-3 related tool calls — it's dramatically faster than sequential calls and each op gets its own success/failure in the summary.
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.
- 2d ago First seen · 52 lines · 123 tokens per session scan A 48a304425733
mcp-unity-dev is a skill published in the GitHub repository pakkio/mcp-unity (0 stars, last pushed 18d ago), licensed MIT. It adds 123 tokens to every session and 2,242 once invoked, about $0.0006 per session on Opus 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-08-31.
Other skills, from other repositories
particles
Use this skill when creating particle effects in Phaser 4. Covers ParticleEmitter, emission zones, death zones, particle properties, textures, gravity wells, and particle movement. Triggers on: particles, emitter, particle effect, explosion, fire, smoke.
web-games
Web browser game development principles. Framework selection, WebGPU, optimization, PWA.
develop-web-game
Use when Codex is building or iterating on a web game (HTML/JS) and needs a reliable development + testing loop: implement small changes, run a Playwright-based test script with short input bursts and intentional pauses, inspect screenshots/text, and review console errors with rendergametotext.
gameobject-component-destroy
Destroy one or more Components from a target GameObject. Missing (null) components are skipped — they cannot be destroyed. Use 'gameobject-find' and 'gameobject-component-get' to identify the components first.
ship-web-games
Package, deploy, and verify a playable Three.js or web game. Use for release builds, asset delivery, private/public deployment, production smoke tests, browser proof, release notes, rollback readiness, and cleanup of temporary QA resources.
unity
Compile, test, and drive Unity for this repo's C# packages (unity/core, jint, quickjs, clearscript) and the two Unity projects (tests/, kitchen-sink/). Use when a change touches C# under unity/, when Unity test results are needed, when a rendering snapshot has to be checked or regenerated, or when the app has to be…