Skip to content

feat: complete local self-hosted auth on the Unity plugin (none/oauth/token)#895

Merged
IvanMurzak merged 2 commits into
mainfrom
worktree-d8c33c472eda
Jul 16, 2026
Merged

feat: complete local self-hosted auth on the Unity plugin (none/oauth/token)#895
IvanMurzak merged 2 commits into
mainfrom
worktree-d8c33c472eda

Conversation

@IvanMurzak

Copy link
Copy Markdown
Owner

Summary

  • Fixes the local gamedev-mcp-server boot crash on the retired authorization=required auth mode (deleted in McpPlugin b5) by completing the local-launch half of the mcp-authorize auth migration.
  • Pins McpPlugin 7.0.0 → 7.1.0 (the DependencyResolver NuGetConfig requested pin; the resolver installs the official 7.1.0 DLLs across the plugin + all 5 Unity-Tests projects) and bumps local ServerVersion 9.0.0 → 9.1.0 (+ the cli/ mirror + test).
  • Consolidation (owner directive — no duplication): McpServerManager.BuildArguments now delegates to the shared McpPlugin ServerLaunchArguments builder; the Unity-private arg logic is deleted.
  • 3-way auth UI none/oauth/token (token field + Generate-Token button only in token mode); each mode wired via the shared builder (none → auth=none; oauth → auth=oauth + auth-issuer + public-url sourced from the same PinnedHttpUrl the Configure button writes; token → auth=token + token=<local-secret>).
  • Migrates persisted AuthOption.requiredtoken on load; scrubs legacy authorization=required/token= from the plugin-local config writers; the Configure button writes the matching client config per mode (none/oauth URL-only, token URL + Authorization: Bearer).

Test plan

  • Unity EditMode (2022.3.62f3): 0 failures across all runnable chunks — including the new AuthOptionMigrationTests, the MainWindowEditorStatusLogicTests auth-segment mapping, the AiAgentConfiguratorViewLogicTests credential-mode cases, and ServerVersionDecouplingTests. (One pre-existing, diff-unrelated fixture, TestsRunDirtySceneTests, is un-runnable via the tests-run MCP tool because its SetUp dirties the scene; validated by CI's native game-ci runner.)
  • Unity PlayMode: 1/1 passed.
  • CLI (cli/): 504 passed / 0 failed (incl. the DEFAULT_SERVER_VERSION ↔ C# ServerVersion drift guard).

Closes #894

…/token)

Finish the local-launch half of the mcp-authorize auth migration so the in-editor
AI Game Developer window's authorization no longer crashes the local
gamedev-mcp-server on boot with the retired "required" value (the strategy deleted
in McpPlugin b5).

- Pin McpPlugin 7.0.0 -> 7.1.0 (DependencyResolver NuGetConfig requested pin; the
  resolver installs the official 7.1.0 DLLs across the plugin + all 5 Unity-Tests
  projects) and bump local ServerVersion 9.0.0 -> 9.1.0 (+ CLI mirror + test).
- Consolidation (owner directive, no duplication): McpServerManager.BuildArguments
  now delegates to the shared McpPlugin ServerLaunchArguments builder.
- 3-way auth UI none/oauth/token; the token field + Generate-Token button appear
  only in token mode. Wire each mode: none => auth=none; oauth => auth=oauth +
  auth-issuer + public-url (sourced from the same PinnedHttpUrl the Configure button
  writes); token => auth=token + token=<local-secret>.
- Migrate persisted AuthOption.required -> token on load; scrub legacy
  authorization=required/token from the plugin-local config writers.
- Configure button writes the matching client config per mode (none/oauth URL-only,
  token URL + Authorization: Bearer via the shared configurator).

Local gate: EditMode 0 failures, PlayMode 1/1, CLI 504 passed.

Closes #894
Fix two stale XML <code> doc-blocks in McpServerManager.cs that survived the
g5/g6 auth scrub and now contradicted the code:
- RawJsonConfigurationStdio: drop the ", token=... if auth required" arg from
  the example (stdio always spawns in none mode; no token arg is ever emitted).
- RawJsonConfigurationHttp: drop the conditional "headers"/"Authorization: Bearer"
  block (config is URL-only now; the offline-token Bearer is written by the shared
  configurator's HttpCredentialMode.AccessToken path, never baked in here).

Comment-only change (no executable code touched). Verified: assets-refresh
recompiled the worktree Editor clean (IsCompiling:false, no compile errors).
/simplify found nothing to change.
@IvanMurzak
IvanMurzak merged commit 406390c into main Jul 16, 2026
16 checks passed
@IvanMurzak
IvanMurzak deleted the worktree-d8c33c472eda branch July 16, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcp-authorize g5/g6: complete local self-hosted auth on the Unity plugin (none/oauth/token)

1 participant