SIGN IN SIGN UP

fix: persist instance selection to disk to survive process restarts (v2.16.3)

The MCP host (Claude Desktop) may kill and restart the server process
between tool calls, wiping all in-memory module-level state. This caused
the instance selection to be lost after ~2 successful tool calls.

Solution: persist critical state (selected instance, discovery flags)
to %LOCALAPPDATA%/UnityMCP/mcp-session-state.json with a 2-hour TTL.
State is restored on module load so the selection survives restarts.

Also adds file-based debug logging to mcp-debug.log for tracing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
F
Francois Cugy committed
4419ac69b65e6279dae1ed874cb2910a712f7893
Parent: 2f5ec00