Skip to content

Commit 5129ed1

Browse files
committed
docs: Codex resource-server key and the Unity 6.5 AI-package livelock
Two reported documentation gaps: - resources/read takes a server key separate from the mcpforunity:// URI. Codex exposes tools as mcp__unityMCP__* but wants server: "unityMCP" on a resource read, which the server instructions never mentioned. Distinct from the name-vs-URI mistake #1302 fixed. - com.unity.ai.assistant can livelock AssetDatabase::InitialRefresh on Unity 6000.5.x, before any MCP assembly loads, which presents as an MCP connection failure. Documents the packages-lock.json deletion people miss. Fixes #1220 Fixes #1219
1 parent ad0d9ce commit 5129ed1

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

Server/src/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ def _build_instructions(project_scoped_tools: bool) -> str:
319319
- Resources are addressed by URI, never by name. A resource's name and URI are NOT interchangeable: names use underscores (e.g. editor_state) while URIs use slashes (e.g. mcpforunity://editor/state). Do NOT build a URI by swapping separators in the name — you will 404.
320320
- These instructions always spell resources as full mcpforunity:// URIs — read one exactly as written. If you only have a name (from resources/list or another tool's output), look its URI up in resources/list rather than guessing it.
321321
- Resource payloads are wrapped: the content lives under a top-level `data` object, so field paths are `data.<section>.<field>` (e.g. `data.advice.ready_for_tools`), not bare top-level fields.
322+
- The mcpforunity:// URI names the resource, not the server. Some clients take a separate server key on a resource read — in Codex, tools are exposed as mcp__unityMCP__* but resources/read wants server: "unityMCP". If a read fails with an unknown-server error, list resources first and use the key exactly as returned.
322323
323324
Script Management:
324325
- After creating or modifying scripts (by your own tools or the `manage_script` tool) use `read_console` to check for compilation errors before proceeding

website/docs/guides/troubleshooting.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,42 @@ Unity AI Assistant bundles `System.Collections.Immutable` v10, while MCP for Uni
146146

147147
---
148148

149+
## Unity 6.5: Editor hangs on load and the bridge never connects
150+
151+
If Unity 6000.5.x spins at ~100% CPU on startup and never opens the Editor window, check `Packages/manifest.json` for `com.unity.ai.assistant` (and `com.unity.ai.inference`, `com.unity.asset-manager-for-unity`).
152+
153+
**Symptoms:**
154+
- The Editor never finishes loading, so MCP for Unity never arms its bridge — which looks like an MCP connection failure
155+
- Stack traces sit inside `AssetDatabase::InitialRefresh``SourceAssetScanner::Refresh``GuidDB::ValidateChangedGUIDs`
156+
157+
**Cause:**
158+
The pre-release AI packages can livelock `AssetDatabase::InitialRefresh`. This happens before any MCP for Unity assembly is loaded, so no MCP code is involved.
159+
160+
**Fix:** remove those packages from `manifest.json`, **delete `Packages/packages-lock.json`** (it re-resolves them otherwise), then clear `Library/`. Disabling the package is not enough — the AI packages re-add each other.
161+
162+
This is a Unity bug (UUM-132096), not an MCP for Unity one.
163+
164+
*Reported by [@100yenadmin](https://github.com/CoplayDev/unity-mcp/issues/1219).*
165+
166+
---
167+
168+
## Codex: `resources/read failed: unknown MCP server`
169+
170+
The `mcpforunity://` URI names the *resource*, not the server. Some clients take a separate server key on a resource read.
171+
172+
In Codex, tools are exposed as `mcp__unityMCP__*`, but `resources/read` wants the discovery key on its own:
173+
174+
```
175+
server: "unityMCP"
176+
uri: "mcpforunity://custom-tools"
177+
```
178+
179+
If a read fails with an unknown-server error, list resources first and use the key exactly as returned.
180+
181+
*Reported by [@drewclifton](https://github.com/CoplayDev/unity-mcp/issues/1220).*
182+
183+
---
184+
149185
## "No Unity Instances Found"
150186

151187
:::tip When in doubt, restart your client

0 commit comments

Comments
 (0)