Skip to content

Conversation

msanatan
Copy link
Contributor

@msanatan msanatan commented Aug 18, 2025

We can use Unity MCP because it's too affiliated. I think "MCP For Unity" is good because:

  • It passes basic asset store validations
  • It's similar to the current name
  • Good SEO as @dsarno pointed out
  • Isn't too heavy hand on the branding (don't want to rub people the wrong way, or have them jump to conclusions about who we are at Coplay)

Aside from the namespace, I changed user facing references of "Unity MCP" to "MCP for Unity".

Once merged in, we should do a major version update and explain the name change

Summary by CodeRabbit

  • Refactor

    • Rebranded “Unity MCP” to “MCP for Unity” across UI, menus (Window > MCP for Unity), logs, and messages.
    • Editor window and bridge renamed; preference keys migrated to MCPForUnity.*.
    • Startup and port handling improved: safer server startup with graceful Unity-connection fallback and port selection now prioritizes stored ports.
  • Documentation

    • All docs updated to new branding; added an Editor Plugin Guide with setup and troubleshooting.
  • Chores

    • Package/display names and assembly metadata updated to MCP for Unity; no functional API changes.

…all files

See thread in CoplayDev#6, we can't use Unity MCP because it violates their trademark.
That name makes us look affiliated. We can use MCP for Unity
These are front facing so has to change for Unity asset store review
Copy link
Contributor

coderabbitai bot commented Aug 18, 2025

Walkthrough

Broad rebranding and namespace migration from UnityMcpBridge/Unity MCP to MCPForUnity/MCP for Unity across C#, Python, asmdefs, and docs. Two behavioral tweaks: PortManager now returns a stored port sooner; server.py adds guarded Unity-connection startup and yields a bridge context during runtime.

Changes

Cohort / File(s) Summary of changes
Tests & Test Assembly
TestProjects/UnityMCPTests/Assets/Tests/EditMode/CommandRegistryTests.cs, TestProjects/UnityMCPTests/Assets/Tests/EditMode/MCPForUnityTests.Editor.asmdef, .../MCPForUnityTests.Editor.asmdef.meta
Test namespace and asmdef renamed to MCPForUnity; assembly reference updated; asmdef meta GUID changed.
Editor Assemblies
UnityMcpBridge/Editor/MCPForUnity.Editor.asmdef, .../MCPForUnity.Editor.asmdef.meta
Editor asmdef renamed to MCPForUnity.Editor; rootNamespace and references updated; meta GUID changed.
Runtime Assembly
UnityMcpBridge/Runtime/MCPForUnity.Runtime.asmdef, .../MCPForUnity.Runtime.asmdef.meta
Runtime asmdef renamed to MCPForUnity.Runtime; rootNamespace updated; meta GUID changed.
Editor Models & Data
UnityMcpBridge/Editor/Models/*, UnityMcpBridge/Editor/Data/*
Namespaces moved to MCPForUnity.Editor.Models / .Data; minor text tweak in McpClient display string; using directives updated.
Editor Helpers (general)
UnityMcpBridge/Editor/Helpers/* (e.g., ExecPath.cs, Response.cs, Vector3Helper.cs, GameObjectSerializer.cs, ServerInstaller.cs, ServerPathResolver.cs)
Namespaces moved to MCPForUnity.Editor.Helpers; EditorPrefs keys and log strings rebranded (e.g., UvPath, PrefClaude); messaging/docstrings updated; no core logic changes except noted below.
Port Manager (behavioral tweak + renames)
UnityMcpBridge/Editor/Helpers/PortManager.cs
Namespace moved; method renamed IsPortUsedByUnityMcpIsPortUsedByMCPForUnity; debug keys/logs rebranded; GetPortWithFallback now returns the stored port after WaitForPortRelease even if not released (changes selection path).
Package Installer (branding)
UnityMcpBridge/Editor/Helpers/PackageInstaller.cs
Namespace moved; user-facing logs and manual-install guidance rebranded to MCP‑FOR‑UNITY; control flow unchanged.
Editor Tools
UnityMcpBridge/Editor/Tools/*
Namespaces moved to MCPForUnity.Editor.Tools; using directives updated to MCPForUnity.*; one EditorPrefs key renamed for script validation; behavior unchanged.
Editor Windows & UI
UnityMcpBridge/Editor/Windows/* (e.g., MCPForUnityEditorWindow.cs, ManualConfigEditorWindow.cs, VSCodeManualSetupWindow.cs, meta files)
Window classes/namespaces renamed to MCPForUnity.Editor.Windows; UI strings, EditorPrefs keys, and bridge references rebranded; meta GUIDs updated; behavior preserved.
Bridge Class
UnityMcpBridge/Editor/MCPForUnityBridge.cs, .../MCPForUnityBridge.cs.meta
Public class renamed UnityMcpBridgeMCPForUnityBridge; namespace, logs, and EditorPrefs keys updated; meta GUID changed.
Runtime Serialization
UnityMcpBridge/Runtime/Serialization/UnityTypeConverters.cs
Namespace moved to MCPForUnity.Runtime.Serialization; converters unchanged.
Python Server & Tools (branding + startup flow)
UnityMcpBridge/UnityMcpServer~/src/* (e.g., __init__.py, config.py, port_discovery.py, server.py, unity_connection.py, tools/__init__.py, pyproject.toml)
Docstrings, logger names, and metadata rebranded to MCP for Unity; pyproject name/description updated; server.py adds try/except around Unity connection, yields {"bridge": _unity_connection} in runtime context, and disconnects on shutdown.
Docs & Scripts
UnityMcpBridge/package.json, CursorHelp.md, README.md, README-DEV.md, claude-chunk.md, UnityMcpBridge/README.md, deploy-dev.bat, restore-dev.bat, mcp_source.py, claude-chunk.md, CursorHelp.md
Widespread textual rebranding to “MCP for Unity” / “MCP For Unity”; added Editor Plugin Guide README; package displayName updated; script banners updated; no code changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant User
  participant Editor as Unity Editor (MCPForUnity)
  participant Bridge as MCPForUnityBridge
  participant Server as mcp-for-unity-server
  participant Unity as Unity Connection

  User->>Editor: Open "MCP for Unity" window
  Editor->>Bridge: Initialize / Auto-connect
  Bridge->>Server: Start / ensure server (port selection)
  note over Bridge,Server: PortManager may return stored port after timeout
  Server->>Server: Startup
  Server->>Unity: Try connect to Unity (try/except)
  alt Connection succeeds
    Server-->>Editor: Context { bridge: UnityConnection }
  else Connection fails
    Server-->>Editor: Context { bridge: null } (warn logged)
  end
  User-->>Editor: Use tools/commands
  Editor->>Server: Tool requests
  Server->>Unity: Forward to Unity (if available)
  Server-->>Editor: Responses
  Editor-->>User: UI updates
  Editor->>Server: Shutdown
  Server->>Unity: Disconnect if connected
  Server-->>Editor: Shutdown complete
Loading
sequenceDiagram
  autonumber
  participant PM as PortManager
  participant Prefs as EditorPrefs

  Prefs-->>PM: StoredPort?
  alt StoredPort exists
    PM->>PM: WaitForPortRelease(timeout)
    alt Released within timeout
      PM-->>PM: Return StoredPort
    else Not released
      note right of PM: New behavior: still return stored port
      PM-->>PM: Return StoredPort
    end
  else No StoredPort
    PM->>PM: Try default port
    alt Default available
      PM-->>PM: Return default
    else Search range
      PM-->>PM: Return first available
    end
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • dsarno

Poem

Hoppity hop, a namespace spree,
Carrots renamed for all to see.
Ports still hum, servers say "hello",
Logs now sparkle, keys in a row.
Rabbit cheers: new names, same flow! 🥕🐇

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🔭 Outside diff range comments (1)
UnityMcpBridge/Editor/Models/McpClient.cs (1)

15-28: Fix potential NRE in Error case and update stale branding in status text

  • McpStatus.Error branch can dereference null when configStatus is null.
  • “Missing UnityMCP Config” should reflect the new product name.

Apply this minimal, safe fix:

             return status switch
             {
                 McpStatus.NotConfigured => "Not Configured",
                 McpStatus.Configured => "Configured",
                 McpStatus.Running => "Running",
                 McpStatus.Connected => "Connected",
                 McpStatus.IncorrectPath => "Incorrect Path",
                 McpStatus.CommunicationError => "Communication Error",
                 McpStatus.NoResponse => "No Response",
-                McpStatus.UnsupportedOS => "Unsupported OS",
-                McpStatus.MissingConfig => "Missing UnityMCP Config",
-                McpStatus.Error => configStatus.StartsWith("Error:") ? configStatus : "Error",
+                McpStatus.UnsupportedOS => "Unsupported OS",
+                McpStatus.MissingConfig => "Missing MCP for Unity Config",
+                McpStatus.Error => (configStatus != null && configStatus.StartsWith("Error:"))
+                    ? configStatus
+                    : (string.IsNullOrEmpty(configStatus) ? "Error" : $"Error: {configStatus}"),
                 _ => "Unknown",
             };
🧹 Nitpick comments (32)
UnityMcpBridge/UnityMcpServer~/src/port_discovery.py (4)

2-12: Grammar nit: use “an MCP” (not “a MCP”) in docstrings

Minor wording fix for professionalism/clarity.

Apply this diff:

-  modified file, and verifies that the port is actually a MCP for Unity listener
+  modified file, and verifies that the port is actually an MCP for Unity listener

56-75: Rename probe helper to match new branding and fix “an MCP” grammar

The helper name still uses the old “unity_mcp” wording. Recommend renaming to align with the PR’s rebrand. Also tweak the article in the docstring.

Apply this diff within this block:

-    def _try_probe_unity_mcp(port: int) -> bool:
-        """Quickly check if a MCP for Unity listener is on this port.
+    def _try_probe_mcp_for_unity(port: int) -> bool:
+        """Quickly check if an MCP for Unity listener is on this port.

And update the two call sites elsewhere in this file:

-            if isinstance(port, int) and PortDiscovery._try_probe_unity_mcp(port):
+            if isinstance(port, int) and PortDiscovery._try_probe_mcp_for_unity(port):
-                    if PortDiscovery._try_probe_unity_mcp(unity_port):
+                    if PortDiscovery._try_probe_mcp_for_unity(unity_port):

22-22: Align logger/category and log messages with “MCP for Unity”

To keep public-facing output consistent with the rebrand, adjust the logger name and a couple of info messages.

Suggested diffs:

-logger = logging.getLogger("unity-mcp-server")
+logger = logging.getLogger("mcp-for-unity-server")
-                logger.info(f"Using Unity port from status: {port}")
+                logger.info(f"Using MCP for Unity port from status: {port}")
-                        logger.info(f"Using Unity port from {path.name}: {unity_port}")
+                        logger.info(f"Using MCP for Unity port from {path.name}: {unity_port}")

Also applies to: 103-109, 122-124


87-88: Be explicit about file encoding when reading JSON

Specify UTF-8 to avoid locale-dependent surprises on some systems.

Apply these diffs:

-            with status_files[0].open('r') as f:
+            with status_files[0].open('r', encoding='utf-8') as f:
                 return json.load(f)
-                with open(path, 'r') as f:
+                with open(path, 'r', encoding='utf-8') as f:
                     cfg = json.load(f)
-                with open(path, 'r') as f:
+                with open(path, 'r', encoding='utf-8') as f:
                     return json.load(f)

Also applies to: 116-117, 151-153

UnityMcpBridge/Editor/Helpers/ExecPath.cs (1)

9-9: Migrate remaining EditorPrefs legacy keys with backward compatibility

Following your scan, there are additional UnityMCP. keys that need the same one-time migration pattern:

  • UnityMcpBridge/Editor/Windows/UnityMcpEditorWindow.cs
    "UnityMCP.PythonDirOverride"
  • UnityMcpBridge/Editor/Windows/UnityMcpEditorWindow.cs
    "UnityMCP.UvPath"
    "UnityMCP.ServerSrc"
  • UnityMcpBridge/Editor/Helpers/ServerInstaller.cs
    "UnityMCP.UvPath"

Please apply the same approach you used for ExecPath.cs to each of these:

  1. Define PrefXyzNew and PrefXyzLegacy.
  2. In getters, read the new key first, fall back to the legacy key, migrate it once, then delete the legacy key.
  3. In setters, write to the new key and delete the legacy key.
  4. In clear/reset methods, delete both keys.

This ensures a smooth transition without breaking existing user settings.

UnityMcpBridge/Editor/Models/MCPConfigServers.cs (1)

9-11: Confirm intent to keep JSON key “unityMCP” or add a forward-compatible alias

The serialized key remains "unityMCP". If backward compatibility is the goal, keeping it is fine. If you also want to accept "mcpForUnity" going forward while serializing only the new name, consider adding an alias property and suppressing legacy serialization.

Example pattern (non-breaking, keeps existing field and accepts new key):

[Serializable]
public class McpConfigServers
{
    // Existing legacy key (read/write preserved for now)
    [JsonProperty("unityMCP")]
    public McpConfigServer unityMCP;

    // New preferred key; deserializes into the same backing field
    [JsonProperty("mcpForUnity", NullValueHandling = NullValueHandling.Ignore)]
    public McpConfigServer mcpForUnity
    {
        get => unityMCP;
        set => unityMCP = value ?? unityMCP;
    }

    // Optional: stop emitting the legacy key while still accepting it on read
    public bool ShouldSerializeunityMCP() => false;
}

If you’d rather keep only the legacy key for now, document it explicitly in the migration guide and bump major as noted in the PR.

UnityMcpBridge/Editor/Models/ServerConfig.cs (1)

9-14: Decide on config key branding vs. stability for unity_host/unity_port

These keys still carry the “unity_” prefix. That’s reasonable to keep for stability. If you plan to rename them (e.g., editor_host/editor_port) in a future major, consider a compatibility layer (custom JsonConverter or dual-property alias pattern) and a deprecation path in docs.

Happy to draft a small JsonConverter that accepts both legacy and new names if you choose to rename.

UnityMcpBridge/Editor/Models/MCPConfigServer.cs (2)

9-11: Validate required fields at deserialization time

Consider marking command as required to fail fast on invalid configs.

Example:

[JsonProperty("command", Required = Required.Always)]
public string command;

12-14: Prefer non-null args by default

To minimize null checks downstream, default args to an empty array or ignore nulls on serialization.

Example:

[JsonProperty("args", NullValueHandling = NullValueHandling.Ignore)]
public string[] args = Array.Empty<string>();
UnityMcpBridge/Editor/Models/McpConfig.cs (1)

9-11: Consider marking mcpServers as required (or document optionality)

If a config without mcpServers is invalid, make that explicit to surface errors earlier.

Example:

[JsonProperty("mcpServers", Required = Required.Always)]
public McpConfigServers mcpServers;
UnityMcpBridge/UnityMcpServer~/src/tools/__init__.py (1)

10-21: Prefer logging over print for server logs

Adopt Python’s logging to integrate with the server’s log pipeline and allow level control.

Apply this diff within the function:

-    print("Registering MCP for Unity Server refactored tools...")
+    logger.info("Registering MCP for Unity Server refactored tools...")
@@
-    print("MCP for Unity Server tool registration complete.")
+    logger.info("MCP for Unity Server tool registration complete.")

And add (outside the selected lines) near the top of this module:

import logging
logger = logging.getLogger("mcp_for_unity.server.tools")
UnityMcpBridge/Editor/Models/Command.cs (1)

8-19: Minor style nit: consider PascalCase properties with JSON attributes

Not required for this PR, but aligning with C# conventions improves readability. If you refactor later, keep JSON wire names stable via attributes.

Example (for future consideration):

public class Command
{
    [JsonProperty("type")]
    public string Type { get; set; }

    [JsonProperty("params")]
    public JObject Params { get; set; }
}
mcp_source.py (1)

3-3: Update selection prompt to match “MCP for Unity” branding

  • mcp_source.py: line 137
    - print("Select MCP package source by number:")
    + print("Select MCP for Unity package source by number:")
  • Confirm that retaining PKG_NAME = "com.coplaydev.unity-mcp" is intentional for backward compatibility.
  • (Optional) If you’re rolling out a full rebrand, there are still “Unity MCP” mentions in dev scripts (restore-dev.bat, deploy-dev.bat) and documentation (README.md, .md files) that you may want to update as well.
UnityMcpBridge/Editor/Helpers/ServerInstaller.cs (1)

249-249: Normalize user-facing logs to “MCP for Unity” branding

To keep all user-facing messages consistent with the PR objective (“MCP for Unity”), please replace every instance of the hyphenated all-caps variant (MCP-FOR-UNITY) in your Debug.Log calls with the title-case string.

Key locations to update (search for MCP-FOR-UNITY to catch them all):

  • UnityMcpBridge/Editor/Helpers/ServerInstaller.cs (line 249)
  • UnityMcpBridge/Editor/UnityMcpBridge.cs (lines 49, 230, 313, 346)
  • UnityMcpBridge/Editor/Helpers/PackageInstaller.cs (lines 28, 34–40)
  • UnityMcpBridge/Editor/Helpers/PortManager.cs (multiple Debug.Log calls)
  • UnityMcpBridge/Editor/Windows/UnityMcpEditorWindow.cs (lines 1626, 1639, etc.)

Example diff for ServerInstaller.cs:

-                Debug.Log("<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: Python environment repaired successfully.");
+                Debug.Log("<b><color=#2EA3FF>MCP for Unity</color></b>: Python environment repaired successfully.");

Optionally, run a global search to ensure no occurrences are missed:

rg -n 'MCP-FOR-UNITY' -g '!**/Library/**'
UnityMcpBridge/Editor/Models/McpTypes.cs (1)

1-12: Consider adding a type migration attribute to preserve serialized data across the namespace move

If McpTypes is ever used in serialized fields (ScriptableObjects, Editor prefs/assets, etc.), a namespace move can break deserialization. Unity’s [MovedFrom] attribute helps remap serialized types after renames/moves.

Apply this diff to annotate the enum:

 namespace MCPForUnity.Editor.Models
 {
-    public enum McpTypes
+    [UnityEngine.Scripting.APIUpdating.MovedFrom("UnityMcpBridge.Editor.Models")]
+    public enum McpTypes
     {
         ClaudeCode,
         ClaudeDesktop,
         Cursor,
         VSCode,
         Windsurf,
         Kiro,
     }
 }

Add this using at the top of the file (outside the selected range) to keep it clean:

using UnityEngine.Scripting.APIUpdating;

If the old assembly name also changed, consider the fuller MovedFrom(...) overload including sourceAssembly to maximize remapping success.

UnityMcpBridge/Editor/Data/McpClients.cs (1)

101-105: Nit: fix list numbering comment (“Kiro” is labeled 3 but is the 6th entry)

Cosmetic only, but keeps the list tidy.

Apply:

-            // 3) Kiro
+            // 6) Kiro
UnityMcpBridge/Editor/Helpers/ServerPathResolver.cs (1)

116-117: Consistent branding casing: prefer “MCP for Unity”

Elsewhere (e.g., package.json displayName), the branding uses a lowercase “for”. Recommend aligning this log string.

Apply:

-                    "MCP For Unity: Detected legacy package id 'com.justinpbarnett.unity-mcp'. " +
+                    "MCP for Unity: Detected legacy package id 'com.justinpbarnett.unity-mcp'. " +

Optionally, scan for other instances of “MCP For Unity” to standardize:

#!/bin/bash
set -euo pipefail
rg -nP -C2 'MCP For Unity' || true
UnityMcpBridge/Editor/Helpers/PortManager.cs (5)

51-52: Centralize the log tag to avoid duplication and drift

You’ve updated all log prefixes to MCP-FOR-UNITY—good. Consider centralizing the tag to a single constant to keep logs consistent and reduce maintenance.

Add inside the class (outside this hunk):

private const string LogTag = "<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>";

Then apply this diff to changed log lines:

- if (IsDebugEnabled()) Debug.Log($"<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: Using stored port {storedConfig.unity_port} for current project");
+ if (IsDebugEnabled()) Debug.Log($"{LogTag}: Using stored port {storedConfig.unity_port} for current project");

- if (IsDebugEnabled()) Debug.Log($"<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: Stored port {storedConfig.unity_port} became available after short wait");
+ if (IsDebugEnabled()) Debug.Log($"{LogTag}: Stored port {storedConfig.unity_port} became available after short wait");

- if (IsDebugEnabled()) Debug.Log($"<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: Discovered and saved new port: {newPort}");
+ if (IsDebugEnabled()) Debug.Log($"{LogTag}: Discovered and saved new port: {newPort}");

- if (IsDebugEnabled()) Debug.Log($"<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: Using default port {DefaultPort}");
+ if (IsDebugEnabled()) Debug.Log($"{LogTag}: Using default port {DefaultPort}");

- if (IsDebugEnabled()) Debug.Log($"<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: Default port {DefaultPort} is in use, searching for alternative...");
+ if (IsDebugEnabled()) Debug.Log($"{LogTag}: Default port {DefaultPort} is in use, searching for alternative...");

- if (IsDebugEnabled()) Debug.Log($"<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: Found available port {port}");
+ if (IsDebugEnabled()) Debug.Log($"{LogTag}: Found available port {port}");

- if (IsDebugEnabled()) Debug.Log($"<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: Saved port {port} to storage");
+ if (IsDebugEnabled()) Debug.Log($"{LogTag}: Saved port {port} to storage");

Also applies to: 60-61, 81-82, 94-95, 98-99, 105-106, 214-215


134-139: Method name still references old brand; provide a forwarder for clarity

Public method IsPortUsedByUnityMcp keeps the old name; for clarity, add a new MCP-branded method and mark the old one obsolete, delegating to the new one. Avoids breaking changes while aligning terminology.

Suggested addition (outside this hunk):

[Obsolete("Use IsPortUsedByMcpForUnity instead.")]
public static bool IsPortUsedByUnityMcp(int port) => IsPortUsedByMcpForUnity(port);

public static bool IsPortUsedByMcpForUnity(int port)
{
    try
    {
        using var client = new TcpClient();
        var connectTask = client.ConnectAsync(IPAddress.Loopback, port);
        if (connectTask.Wait(100))
            return client.Connected;
        return false;
    }
    catch
    {
        return false;
    }
}

12-18: Registry path/file names still use unity-mcp; confirm backward-compat intent

The storage directory/file names remain “.unity-mcp” and “unity-mcp-port*.json”. If this is for backward compatibility, great. If not, consider a migration strategy (read old, write new, and document).

Would you like a migration helper that transparently moves/aliases ~/.unity-mcp to a new ~/.mcp-for-unity path?


143-151: Minor: avoid blocking Wait on ConnectAsync in editor thread

Using Task.Wait(100) can block the editor thread. If this runs on the main thread during domain reloads, consider a non-blocking poll with a short TcpClient timeout or using CancellationToken with ConnectAsync. Not critical.


51-52: Support new debug prefs key with legacy fallback

To preserve users’ existing “UnityMCP.DebugLogs” setting after renaming to “MCPForUnity.DebugLogs,” update your debug‐flag helper and any direct prefs calls:

• PortManager.IsDebugEnabled (lines 19–23 in PortManager.cs)

 private static bool IsDebugEnabled()
 {
     try
     {
-          return EditorPrefs.GetBool("UnityMCP.DebugLogs", false);
+          if (EditorPrefs.HasKey("MCPForUnity.DebugLogs"))
+              return EditorPrefs.GetBool("MCPForUnity.DebugLogs", false);
+          return EditorPrefs.GetBool("UnityMCP.DebugLogs", false);
     }
     catch { return false; }
 }

• UnityMcpEditorWindow.cs (line 59) – replace the direct prefs lookup with the helper:

- debugLogsEnabled = EditorPrefs.GetBool("UnityMCP.DebugLogs", false);
+ debugLogsEnabled = PortManager.IsDebugEnabled();

Optional: scan docs/scripts for old brand mentions (e.g., Unity MCP, UnityMcpBridge.) and update as needed.

UnityMcpBridge/Editor/Helpers/PackageInstaller.cs (1)

28-40: It looks like the existing code already defines only the legacy key and does not centralize the log tag. Since we found no LogTag constant and only the legacy InstallationFlagKey, the optional refactor suggestion stands. No other code references the old-brand preference key aside from this file. We should update the review comment to reflect that:

  • Introduce a LogTag constant.
  • Introduce LegacyFlagKey and NewFlagKey, and update read/write logic.
  • Remove the manual search script since we confirmed no other references in code at runtime.

Rewritten review comment below.

UnityMcpBridge/Editor/Tools/CommandRegistry.cs (2)

12-24: Make the handler lookup truly case-insensitive (matches the comment)

The dictionary is created with default comparer; TryGetValue is exact-match, so the “case-insensitive” comment isn’t enforced. Consider using a case-insensitive comparer for the dictionary.

Example change (outside this hunk):

private static readonly Dictionary<string, Func<JObject, object>> _handlers =
    new(StringComparer.OrdinalIgnoreCase)
{
    // handlers...
};

Also applies to: 31-35


7-10: Nit: remove “(Refactored Version)” from summary

This internal note adds noise to public documentation. Safe to drop.

- /// Registry for all MCP command handlers (Refactored Version)
+ /// Registry for all MCP command handlers
UnityMcpBridge/Editor/Tools/ManageScript.cs (1)

412-423: Persisted EditorPrefs key still uses “UnityMCP_”; migrate to new key with fallback

You’re still reading "UnityMCP_ScriptValidationLevel". For a clean rebrand and to avoid future collisions, read/write "MCPForUnity_ScriptValidationLevel" and fall back to the old key once to migrate. Also prefer ToLowerInvariant for culture safety.

Apply within this method:

-        private static ValidationLevel GetValidationLevelFromGUI()
-        {
-            string savedLevel = EditorPrefs.GetString("UnityMCP_ScriptValidationLevel", "standard");
-            return savedLevel.ToLower() switch
+        private static ValidationLevel GetValidationLevelFromGUI()
+        {
+            // Try the new key first, then migrate from the legacy key once if present
+            string savedLevel = EditorPrefs.GetString(PrefKeyValidationLevelNew, null);
+            if (string.IsNullOrEmpty(savedLevel))
+            {
+                savedLevel = EditorPrefs.GetString(PrefKeyValidationLevelOld, "standard");
+                if (!string.IsNullOrEmpty(savedLevel))
+                {
+                    EditorPrefs.SetString(PrefKeyValidationLevelNew, savedLevel); // one-time migration
+                }
+            }
+            return (savedLevel ?? "standard").ToLowerInvariant() switch
             {
                 "basic" => ValidationLevel.Basic,
                 "standard" => ValidationLevel.Standard,
                 "comprehensive" => ValidationLevel.Comprehensive,
                 "strict" => ValidationLevel.Strict,
                 _ => ValidationLevel.Standard // Default fallback
             };
         }

Add these constants once inside ManageScript to avoid magic strings and ease future changes:

// Inside the ManageScript class (near the top)
private const string PrefKeyValidationLevelNew = "MCPForUnity_ScriptValidationLevel";
private const string PrefKeyValidationLevelOld = "UnityMCP_ScriptValidationLevel";
UnityMcpBridge/Editor/Tools/ManageEditor.cs (1)

10-10: Optional: Provide transitional stubs in old namespaces to ease upgrade

Since this is a breaking namespace change, consider shipping thin, [Obsolete] forwarding stubs under UnityMcpBridge.Editor.Tools for a release or two to smooth adoption. This avoids immediately breaking consumers’ code while they migrate imports.

Example stub (in a separate .cs, compiled with an opt-in define or slated for removal next major):

namespace UnityMcpBridge.Editor.Tools
{
    [System.Obsolete("Use MCPForUnity.Editor.Tools.ManageEditor instead.")]
    public static class ManageEditor
    {
        public static object HandleCommand(Newtonsoft.Json.Linq.JObject @params)
            => MCPForUnity.Editor.Tools.ManageEditor.HandleCommand(@params);
    }
}
UnityMcpBridge/Editor/UnityMcpBridge.cs (2)

45-51: Branding prefix updated; consider centralizing for consistency.

The MCP-FOR-UNITY tag is repeated in several log messages. A single constant reduces drift and makes future changes trivial.

Apply this diff to introduce a constant and use it here:

   // Debug helpers
+  private const string BrandTag = "<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>";
   private static bool IsDebugEnabled()
   {
@@
-    Debug.Log($"<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: [{stage}]");
+    Debug.Log($"{BrandTag}: [{stage}]");

Then reuse BrandTag in other logs in this file (see suggested diffs below).


228-232: Rebranded log messages look good; suggest unifying with a constant.

The user-facing prefix is consistently “MCP-FOR-UNITY”. To avoid copy-paste divergence, use a shared constant as suggested above.

Apply this diff to reuse BrandTag:

- Debug.Log($"<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: UnityMcpBridge already running on port {currentUnityPort}");
+ Debug.Log($"{BrandTag}: UnityMcpBridge already running on port {currentUnityPort}");
@@
- Debug.Log($"<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: UnityMcpBridge started on port {currentUnityPort}.");
+ Debug.Log($"{BrandTag}: UnityMcpBridge started on port {currentUnityPort}.");
@@
- Debug.Log("<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: UnityMcpBridge stopped.");
+ Debug.Log($"{BrandTag}: UnityMcpBridge stopped.");

Also applies to: 311-320, 342-347

UnityMcpBridge/Editor/Windows/UnityMcpEditorWindow.cs (3)

233-235: Header label rebranded.

“MCP for Unity Editor” matches user-facing expectations.

There are a few remaining UI strings in this file referring to “UnityMcpServer/src” when prompting users to pick a folder (e.g., the OpenFolderPanel title and a setup dialog). If we want all user-visible wording to reflect the rebrand, consider updating those prompts to “MCP for Unity server (server.py)”. No functional impact.


308-316: Repair Python Env: FQCN is fine; dialogs rebranded.

Using global::MCPForUnity... ensures no ambiguity, and the dialogs now say “MCP for Unity”. All good.

Given you already have using MCPForUnity.Editor.Helpers; at Line 15, you can call ServerInstaller.RepairPythonEnvironment() without the global qualifier to keep style consistent across the file.


1625-1640: Claude registration logs: confirm intentional retention of “UnityMCP” as the server name.

The prefix is rebranded, but the registered server name remains “UnityMCP”. This is likely intentional for compatibility with existing Claude configs. If you plan to migrate to a new server name (e.g., “MCPForUnity”), you’ll want dual-name handling and migration steps (add new, remove old) to avoid breaking users.

I can prep a safe migration plan and code (register under both names, detect existing, deprecate old) if you want to move the external server identifier too.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 14a6cba and fb7ebfd.

📒 Files selected for processing (46)
  • TestProjects/UnityMCPTests/Assets/Tests/EditMode/CommandRegistryTests.cs (1 hunks)
  • TestProjects/UnityMCPTests/Assets/Tests/EditMode/MCPForUnityTests.Editor.asmdef (1 hunks)
  • TestProjects/UnityMCPTests/Assets/Tests/EditMode/MCPForUnityTests.Editor.asmdef.meta (1 hunks)
  • UnityMcpBridge/Editor/Data/DefaultServerConfig.cs (1 hunks)
  • UnityMcpBridge/Editor/Data/McpClients.cs (1 hunks)
  • UnityMcpBridge/Editor/Helpers/ExecPath.cs (1 hunks)
  • UnityMcpBridge/Editor/Helpers/GameObjectSerializer.cs (1 hunks)
  • UnityMcpBridge/Editor/Helpers/PackageInstaller.cs (2 hunks)
  • UnityMcpBridge/Editor/Helpers/PortManager.cs (7 hunks)
  • UnityMcpBridge/Editor/Helpers/Response.cs (1 hunks)
  • UnityMcpBridge/Editor/Helpers/ServerInstaller.cs (2 hunks)
  • UnityMcpBridge/Editor/Helpers/ServerPathResolver.cs (2 hunks)
  • UnityMcpBridge/Editor/Helpers/Vector3Helper.cs (1 hunks)
  • UnityMcpBridge/Editor/MCPForUnity.Editor.asmdef (1 hunks)
  • UnityMcpBridge/Editor/MCPForUnity.Editor.asmdef.meta (1 hunks)
  • UnityMcpBridge/Editor/Models/Command.cs (1 hunks)
  • UnityMcpBridge/Editor/Models/MCPConfigServer.cs (1 hunks)
  • UnityMcpBridge/Editor/Models/MCPConfigServers.cs (1 hunks)
  • UnityMcpBridge/Editor/Models/McpClient.cs (1 hunks)
  • UnityMcpBridge/Editor/Models/McpConfig.cs (1 hunks)
  • UnityMcpBridge/Editor/Models/McpStatus.cs (1 hunks)
  • UnityMcpBridge/Editor/Models/McpTypes.cs (1 hunks)
  • UnityMcpBridge/Editor/Models/ServerConfig.cs (1 hunks)
  • UnityMcpBridge/Editor/Tools/CommandRegistry.cs (1 hunks)
  • UnityMcpBridge/Editor/Tools/ExecuteMenuItem.cs (1 hunks)
  • UnityMcpBridge/Editor/Tools/ManageAsset.cs (2 hunks)
  • UnityMcpBridge/Editor/Tools/ManageEditor.cs (1 hunks)
  • UnityMcpBridge/Editor/Tools/ManageGameObject.cs (1 hunks)
  • UnityMcpBridge/Editor/Tools/ManageScene.cs (1 hunks)
  • UnityMcpBridge/Editor/Tools/ManageScript.cs (2 hunks)
  • UnityMcpBridge/Editor/Tools/ManageShader.cs (1 hunks)
  • UnityMcpBridge/Editor/Tools/ReadConsole.cs (1 hunks)
  • UnityMcpBridge/Editor/UnityMcpBridge.cs (5 hunks)
  • UnityMcpBridge/Editor/Windows/ManualConfigEditorWindow.cs (1 hunks)
  • UnityMcpBridge/Editor/Windows/UnityMcpEditorWindow.cs (7 hunks)
  • UnityMcpBridge/Editor/Windows/VSCodeManualSetupWindow.cs (3 hunks)
  • UnityMcpBridge/Runtime/MCPForUnity.Runtime.asmdef (1 hunks)
  • UnityMcpBridge/Runtime/MCPForUnity.Runtime.asmdef.meta (1 hunks)
  • UnityMcpBridge/Runtime/Serialization/UnityTypeConverters.cs (1 hunks)
  • UnityMcpBridge/UnityMcpServer~/src/__init__.py (1 hunks)
  • UnityMcpBridge/UnityMcpServer~/src/config.py (1 hunks)
  • UnityMcpBridge/UnityMcpServer~/src/port_discovery.py (2 hunks)
  • UnityMcpBridge/UnityMcpServer~/src/server.py (3 hunks)
  • UnityMcpBridge/UnityMcpServer~/src/tools/__init__.py (2 hunks)
  • UnityMcpBridge/package.json (1 hunks)
  • mcp_source.py (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
UnityMcpBridge/Editor/Windows/UnityMcpEditorWindow.cs (1)
UnityMcpBridge/Editor/Helpers/ServerInstaller.cs (2)
  • ServerInstaller (10-448)
  • RepairPythonEnvironment (156-257)
UnityMcpBridge/Editor/Helpers/PortManager.cs (1)
UnityMcpBridge/Editor/UnityMcpBridge.cs (1)
  • IsDebugEnabled (40-43)
🔇 Additional comments (50)
UnityMcpBridge/Editor/MCPForUnity.Editor.asmdef.meta (1)

2-2: GUID rotation verified
No occurrences of the old GUID b28bd738cf38847dfa90ffcbfb130965 remain in any .asmdef files. The only GUID entries now are:

  • 98f702da6ca044be59a864a9419c4eab (this editor assembly)
  • 560b04d1a97f54a46a2660c3cc343a6f (the runtime assembly)

All references have been correctly updated.

UnityMcpBridge/Editor/Models/McpClient.cs (1)

1-1: Namespace rename looks correct

Type relocation to MCPForUnity.Editor.Models matches the PR intent. Ensure using directives/usages in callers are updated by the asmdef/namespace migration (tests look covered per PR summary).

UnityMcpBridge/UnityMcpServer~/src/config.py (1)

2-2: Docstring rename LGTM

Matches the rebranding; no functional impact.

UnityMcpBridge/Editor/Models/MCPConfigServers.cs (1)

4-4: Namespace rename to MCPForUnity.Editor.Models — LGTM

This aligns with the project-wide rebrand; type relocation is consistent.

UnityMcpBridge/Editor/Models/ServerConfig.cs (1)

4-4: Namespace rename to MCPForUnity.Editor.Models — LGTM

No behavioral changes introduced.

UnityMcpBridge/Editor/Models/MCPConfigServer.cs (1)

4-4: Namespace rename to MCPForUnity.Editor.Models — LGTM

Type relocation only; consistent with the rest of the PR.

UnityMcpBridge/Editor/Models/McpConfig.cs (1)

4-4: Namespace rename to MCPForUnity.Editor.Models — LGTM

Matches the broader rename; no functional change.

UnityMcpBridge/UnityMcpServer~/src/tools/__init__.py (1)

12-12: Branding string updates look consistent

Text changes align with the repo-wide rename. No functional impact.

Also applies to: 21-21

TestProjects/UnityMCPTests/Assets/Tests/EditMode/MCPForUnityTests.Editor.asmdef.meta (1)

2-2: No lingering references to the old GUID detected

I ran a project-wide search for 7d76fa93cbc5144028727fd2dbac5655 and for the assembly names UnityMCPTests.EditMode/UnityMCPTests.Editor in all .asmdef and related files—no matches were found. All downstream references appear updated.

UnityMcpBridge/Editor/Models/Command.cs (2)

3-3: Namespace rename acknowledged

The move to MCPForUnity.Editor.Models is straightforward and consistent with the rebrand.


3-3: No remaining references to UnityMcpBridge.Editor.Models found
I searched the entire codebase for both direct and reflection-based usages of the old namespace and found no matches. The rename to MCPForUnity.Editor.Models appears safe to merge.

UnityMcpBridge/Runtime/MCPForUnity.Runtime.asmdef (2)

2-3: Runtime asmdef rename/rootNamespace update looks good

Name and rootNamespace align with the MCPForUnity.* pattern.


2-3: Update Editor asmdef to reference the new Runtime GUID

The Editor asmdef still points at the old Runtime GUID. Please replace it with the new one (562a750ff18ee4193928e885c708fee1). No other asmdefs reference the old runtime name/GUID.

• UnityMcpBridge/Editor/MCPForUnity.Editor.asmdef

  • Change in “references”:
     "references": [
  •   "MCPForUnity.Runtime",
    
  •   "GUID:560b04d1a97f54a46a2660c3cc343a6f"
    
  •   "MCPForUnity.Runtime",
    
  •   "GUID:562a750ff18ee4193928e885c708fee1"
    
    ],
    
    
    
    

Likely an incorrect or invalid review comment.

UnityMcpBridge/Runtime/MCPForUnity.Runtime.asmdef.meta (1)

2-2: No broken asmdef references detected

Ran searches for the old GUID 04b0581466993404a8fae14802c2a5a6 in all .asmdef/.asmref files and for name-based references to “UnityMcpBridge”/“UnityMCP”/“UnityMcp”. No matches were found—there are no stale references to update.

UnityMcpBridge/Editor/Helpers/Response.cs (1)

4-4: Namespace relocation looks good and aligns with the rebrand

Public API surface remains the same; just the namespace moved to MCPForUnity.Editor.Helpers. No functional changes observed.

UnityMcpBridge/Editor/Helpers/ServerInstaller.cs (1)

8-8: Namespace rename aligns with PR objectives

The move to MCPForUnity.Editor.Helpers is consistent with the rebrand; no behavioral changes introduced here.

UnityMcpBridge/UnityMcpServer~/src/server.py (2)

24-39: Startup/shutdown branding updated — LGTM

User-facing startup and shutdown log messages now reflect “MCP for Unity”. No behavioral changes; consistent with the PR goals.


55-58: Help text and docstring branding updated — LGTM

The prompt text and docstring now use “MCP for Unity”; matches the repository-wide rebrand.

UnityMcpBridge/Runtime/Serialization/UnityTypeConverters.cs (1)

9-9: Internal references cleared; optional transitional shims recommended

We ran the ripgrep script across the repo and found no remaining UnityMcpBridge.* namespace or asmdef references. Since you’re targeting a major version bump, the namespace change is expected. To ease migration for external consumers, you may optionally add a legacy shim in the old namespace:

• Create UnityMcpBridge/Runtime/Serialization/LegacyTypeForwarders.cs
– Forward each converter with [Obsolete] attributes pointing to MCPForUnity.Runtime.Serialization.* (example provided below).

Otherwise, this PR is ready to merge.

UnityMcpBridge/Editor/Helpers/GameObjectSerializer.cs (2)

9-9: LGTM: using directive updated to new runtime serialization namespace

Import now points to MCPForUnity.Runtime.Serialization to pick up the moved converters. Assuming the editor asmdef references MCPForUnity.Runtime, this should compile cleanly.


11-11: Update documentation and samples for namespace rename

No in-repo references to UnityMcpBridge.Editor.Helpers.GameObjectSerializer were found. However, changing the namespace to MCPForUnity.Editor.Helpers will break any external call sites or samples that import the old namespace. Please:

  • Update all documentation, README files, and sample code to use MCPForUnity.Editor.Helpers.
  • If you need to support a smooth migration, consider adding a legacy shim under the old namespace (UnityMcpBridge.Editor.Helpers) that forwards key static methods to the new types.

Let me know if you’d like assistance setting up those static forwarders.

UnityMcpBridge/Editor/Data/McpClients.cs (1)

4-6: LGTM: namespace and models import migrated to MCPForUnity

The using and namespace changes correctly align with the new MCPForUnity.* structure.

UnityMcpBridge/Editor/Models/McpStatus.cs (1)

1-1: LGTM: enum moved to MCPForUnity.Editor.Models

Pure namespace relocation; no behavioral change. Downstream references need updated using directives.

UnityMcpBridge/Editor/Helpers/ServerPathResolver.cs (1)

6-6: LGTM: helper moved under MCPForUnity.Editor.Helpers

Matches the broader rebrand; no functional changes in resolution logic.

UnityMcpBridge/Editor/Helpers/Vector3Helper.cs (1)

4-4: Namespace rename verified—no stale references to UnityMcpBridge.Editor.Helpers

I searched the entire repo for any usages of the old namespace and found none. All downstream references have been updated.

UnityMcpBridge/Editor/Helpers/PortManager.cs (1)

12-18: Namespace/docs rename aligned with rebrand

The MCPForUnity.Editor.Helpers namespace and updated XML summary are consistent with the PR goals.

UnityMcpBridge/Editor/Helpers/PackageInstaller.cs (1)

4-4: Namespace rename aligns with rebrand

MCPForUnity.Editor.Helpers is consistent with the new package identity.

UnityMcpBridge/Editor/Tools/CommandRegistry.cs (2)

12-24: Verify Python-side bridge naming consistency

The C# handlers map commands under ctx.bridge.unity_editor. No matching occurrences were found in this repo’s Python files, so please confirm on the Python server side that the bridge is still named unity_editor (or update both sides to match) to avoid broken calls.

• Review the Python server scripts for ctx.bridge.unity_editor
• If the bridge name changed (e.g. to mcp_for_unity), update the C# registry accordingly


5-5: Namespace rename verified

No remaining references to the old UnityMcpBridge namespace were found in C# files or .asmdef assembly definitions. All test assemblies and project references appear correctly updated.

UnityMcpBridge/Editor/Data/DefaultServerConfig.cs (1)

1-1: No stale imports or references found

The move to MCPForUnity.Editor.Data and MCPForUnity.Editor.Models aligns with the rebrand, and the repository-wide search returned no hits on the old UnityMcpBridge.Editor.* namespaces. Approving the changes as-is.

TestProjects/UnityMCPTests/Assets/Tests/EditMode/CommandRegistryTests.cs (1)

4-4: No test asmdefs to update; references resolve correctly
I searched for any .asmdef files under TestProjects/UnityMCPTests/Assets/Tests/EditMode and found none—tests rely on Unity’s default Editor assembly. The import

using MCPForUnity.Editor.Tools;

in CommandRegistryTests.cs resolves to the updated MCPForUnity.Editor.Tools namespace in the Editor assembly, and there are no lingering UnityMcpBridge or old test references. All namespaces and assembly references look clean.

UnityMcpBridge/Editor/Tools/ManageScript.cs (2)

8-8: Helper namespace import rebranded correctly

Import now targets MCPForUnity.Editor.Helpers; aligns with the rename.


20-20: Tooling namespace rebrand LGTM

Public API surface moved to MCPForUnity.Editor.Tools with no functional changes. Good.

UnityMcpBridge/Editor/Tools/ManageScene.cs (1)

10-10: Namespace and helper import rename LGTM

Using MCPForUnity.Editor.Helpers and MCPForUnity.Editor.Tools is consistent with the project-wide rebrand. No behavioral change introduced.

Also applies to: 12-12

UnityMcpBridge/Editor/Tools/ManageEditor.cs (1)

8-8: Editor helper import and namespace rebrand look correct

References updated to MCPForUnity.Editor.Helpers and MCPForUnity.Editor.Tools without touching logic. Good.

Also applies to: 10-10

UnityMcpBridge/Editor/Windows/ManualConfigEditorWindow.cs (1)

4-4: Window’s model import and namespace rebrand LGTM

References moved to MCPForUnity.Editor.Models and MCPForUnity.Editor.Windows as intended. No logic changes observed.

Also applies to: 6-6

UnityMcpBridge/Editor/Tools/ManageGameObject.cs (1)

12-15: Incomplete rebrand – lingering UnityMcpBridge references found

I ran the scan and found multiple remnants of the old UnityMCP/UnityMcpBridge branding throughout the repo. These need to be updated to MCPForUnity (or the new brand) to complete the rename:

• restore-dev.bat (lines 8–10: references to UnityMcpBridge\UnityMcpServer~)
• deploy-dev.bat (lines 11–14: BRIDGE_SOURCE, SERVER_SOURCE paths)
• mcp_source.py (constants: BRIDGE_SUBPATH = "UnityMcpBridge", upstream URL path)
• README.md and README-DEV.md (numerous “Unity MCP” and “UnityMcpBridge” references in titles, examples, descriptions)
• UnityMcpBridge/ directory and files (class names, debug-log messages in UnityMcpBridge.cs, namespace, file paths)
• TestProjects/UnityMCPTests/Packages (packages-lock.json & manifest.json pointing at file:…/UnityMcpBridge)

Please update these scripts, docs, class names, namespaces, directory names and test manifests to fully reflect the new MCPForUnity branding.

Likely an incorrect or invalid review comment.

TestProjects/UnityMCPTests/Assets/Tests/EditMode/MCPForUnityTests.Editor.asmdef (1)

2-2: ✅ Test asmdef rename and references verified

Ran a search for UnityMcpBridge.Editor in TestProjects and found no matches. Changes can be approved.

UnityMcpBridge/Editor/Tools/ManageShader.cs (1)

8-8: Namespace/import update aligns with MCPForUnity.*; no functional changes.

The switch to MCPForUnity.Editor.Helpers and MCPForUnity.Editor.Tools is consistent with the assembly rename. No issues spotted.

Also applies to: 10-10

UnityMcpBridge/Editor/Tools/ReadConsole.cs (1)

9-9: Namespace/import update is correct; reflection behavior unchanged.

Imports and namespace now point to MCPForUnity.*; the rest of the file retains behavior. Good to go.

Also applies to: 11-11

UnityMcpBridge/Editor/MCPForUnity.Editor.asmdef (1)

2-3: All asmdef names and references updated successfully – no old assembly names detected

Verified across all .asmdef files:

  • No occurrences of "UnityMcpBridge" in any "name" or "references" fields
  • Every asmdef now uses "MCPForUnity" (Runtime, Editor, and Tests assemblies)

Good to merge.
(Optional) For greater clarity, you may follow up by renaming the on-disk folder UnityMcpBridge/ to MCPForUnity/ so folder names align with your new assembly names.

UnityMcpBridge/Editor/UnityMcpBridge.cs (2)

710-713: Heartbeat file path still uses “.unity-mcp”. Confirm intended for compatibility.

The status directory/file names remain “.unity-mcp” and “unity-mcp-status-…json”. If the rebrand is only for user-facing UI/logs, keeping this path is fine for backward compatibility. If the path is considered “public-facing plugin output,” renaming might be desired—but will require coordination with any consumers.

Would you like to keep the heartbeat location as-is for compatibility, and document this? If you plan to migrate the path, I can outline a phased approach (write to both paths for a couple of releases, then deprecate).


13-18: Rebrand verification complete: no leftover UnityMcpBridge namespaces and asmdef rootNamespace fields updated
All occurrences of namespace UnityMcpBridge have been removed, and imports now target MCPForUnity.*. asmdef files have the correct rootNamespace settings:

  • Runtime: "MCPForUnity.Runtime"
  • Editor: "MCPForUnity.Editor"
  • Test project asmdef intentionally leaves rootNamespace blank

No further changes required.

UnityMcpBridge/Editor/Tools/ExecuteMenuItem.cs (1)

6-9: Namespace and helper import successfully rehomed.

ExecuteMenuItem now resides under MCPForUnity.Editor.Tools and uses MCPForUnity.Editor.Helpers.Response. No functional changes introduced.

UnityMcpBridge/Editor/Windows/VSCodeManualSetupWindow.cs (2)

4-9: Namespace and model import update are correct.

Type relocation to MCPForUnity.Editor.Windows and model import to MCPForUnity.Editor.Models are consistent with the rebrand.


60-62: UI text rebranded to “MCP for Unity”.

Header and reminder string now match the new branding. Good catch on these user-facing strings.

Also applies to: 268-270

UnityMcpBridge/Editor/Tools/ManageAsset.cs (1)

9-10: ManageAsset successfully moved to MCPForUnity.Editor.Tools.

Using directive and namespace updates look correct. No behavior change.

Also applies to: 19-20

UnityMcpBridge/Editor/Windows/UnityMcpEditorWindow.cs (3)

14-18: Namespace and using updates are aligned with MCPForUnity.

This keeps the window and its dependencies under the new namespace umbrella.


533-536: Auto-setup warning rebranded.

Message now reflects “MCP for Unity”. Good.


47-51: No legacy menu items remain
A repository-wide search confirms the only MenuItem("Window/…MCP") registration is the updated entry in UnityMcpBridge/Editor/Windows/UnityMcpEditorWindow.cs (line 47). No stale "Window/Unity MCP" entries were detected.

@msanatan
Copy link
Contributor Author

I'll change the name in a few more places as well

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
README.md (2)

118-121: Fix typo: “Instal” → “Install”.

-1.  Instal the [OpenUPM CLI](https://openupm.com/docs/getting-started-cli.html)
+1.  Install the [OpenUPM CLI](https://openupm.com/docs/getting-started-cli.html)

286-286: HTML tag typo in summary: unclosed .

-  <summary><strong>✅ Completed Features<strong></summary>
+  <summary><strong>✅ Completed Features</strong></summary>
🧹 Nitpick comments (10)
UnityMcpBridge/UnityMcpServer~/src/pyproject.toml (1)

4-4: Description rebrand is consistent; consider standardizing distribution name style.

The new description matches the rebrand. As an optional improvement, consider a more conventional distribution name (e.g., mcp-for-unity-server) to align with common PyPI naming styles and improve readability in installers. Not required if you prefer the current casing.

README-DEV.md (3)

38-38: Nit: align backup folder name with new branding.

Consider renaming the suggested backup directory to match the product name.

-4. Enter backup location (or use default: `%USERPROFILE%\Desktop\unity-mcp-backup`)
+4. Enter backup location (or use default: `%USERPROFILE%\Desktop\mcp-for-unity-backup`)

1-1: Standardize “MCP for Unity” casing across the repo

Based on the split usage (38× “MCP For Unity” vs 29× “MCP for Unity”) and the PR title/package displayName using lowercase “for,” let’s adopt “MCP for Unity” everywhere for consistency.

• Replace all occurrences of “MCP For Unity” with “MCP for Unity” in:
– README.md (lines 1, 16, 22, 52, etc.)
– README-DEV.md (line 1)
– Any other docs or code comments/UI strings in UnityMcpBridge/**

• Leave existing lowercase “for” usages unchanged.


33-38: Legacy default server/install paths still reference UnityMCP/UnityMcpServer

We’ve confirmed that the following files and docs continue to use UnityMCP/UnityMcpServer as the default install or server-src folder:

• deploy-dev.bat (DEFAULT_SERVER_PATH)
• restore-dev.bat (DEFAULT_SERVER_PATH)
• README-DEV.md (Usage default server path)
• README.md (multiple --directory …/UnityMCP/UnityMcpServer/src examples)
• CursorHelp.md (PowerShell path examples)
• UnityMcpBridge/Editor/Helpers/ServerInstaller.cs & ServerPathResolver.cs
• UnityMcpBridge/Editor/Windows/UnityMcpEditorWindow.cs (folder-picker title and candidate names)

If the recent rebrand deliberately preserves these legacy folder names for backward compatibility, please add a brief note (e.g. under “Usage” in README-DEV.md) clarifying that the default paths remain UnityMCP/UnityMcpServer/src. Otherwise, update all default-path strings and code references to reflect the new product/folder name.

CursorHelp.md (2)

31-41: Consider adding a brief “Compatibility” note about JSON keys.

Examples still use unityMCP for the server id. If that’s intentional for compatibility, add a one-liner stating the identifier remains unityMCP even after rebranding to avoid user confusion.

Proposed text to append after the JSON snippet:
“Note: The server identifier remains unityMCP for backward compatibility; the display name is ‘MCP for Unity’.”


75-76: Capitalize “Unity” and tighten the sentence.

-- If the unity window keeps rewriting to a different `uv.exe`, pick the Links shim again; MCP For Unity saves a pinned override and will stop auto-rewrites.
+- If the Unity window keeps rewriting to a different `uv.exe`, pick the Links shim again; MCP for Unity saves a pinned override and will stop auto-rewrites.

Also aligns casing (“for”) if you choose that as canonical.

README.md (4)

1-1: Standardize product name casing (“MCP for Unity” vs “MCP For Unity”).

This heading uses “MCP For Unity”. PR title/package displayName use “MCP for Unity”. Pick one and apply consistently across docs, UI strings, and code.

Run the same repo-wide check as suggested in README-DEV.md to decide and normalize.


138-141: Optional: unify bullet style and indentation to satisfy markdownlint.

Currently mixes dash/asterisk and inconsistent indent. Not functionally important, but it’ll quiet MD004/MD007 lints.

Example (switch to asterisks at first column):

-  - **VSCode**: uses `Code/User/mcp.json` ...
-  - **Cursor / Windsurf** [(**help link**)](...) ...
+* **VSCode**: uses `Code/User/mcp.json` ...
+* **Cursor / Windsurf** [(**help link**)](...) ...

344-347: Clarify language: users didn’t “clone” in Step 1.

Step 1 installs the package; the server is auto-installed. Reword to avoid implying a manual clone.

-    - **Verify Server Path:** Double-check the --directory path in your MCP Client's JSON config. It must exactly match the location where you cloned the UnityMCP repository in Installation Step 1 (e.g., .../Programs/UnityMCP/UnityMcpServer/src).
+    - **Verify Server Path:** Double-check the --directory path in your MCP Client's JSON config. It must match the installed server location from Installation Step 1 (e.g., .../Programs/UnityMCP/UnityMcpServer/src).
-    - **Run Manually:** Try running the server directly from the terminal to see errors: `# Navigate to the src directory first! cd /path/to/your/UnityMCP/UnityMcpServer/src uv run server.py`
+    - **Run Manually:** Try running the server directly from the terminal to see errors: `# Navigate to the src directory first! cd /path/to/installed/UnityMCP/UnityMcpServer/src && uv run server.py`

If install paths were rebranded, update “UnityMCP” accordingly (see earlier verification).


155-170: Add a brief note about legacy identifiers in config examples.

JSON examples keep “unityMCP”/“UnityMCP” identifiers. If that’s intentional for backward compatibility, add a one-liner note to prevent confusion with the new product name.

Suggested note to append after each example:
“Note: The server identifier remains ‘UnityMCP’ for compatibility. The product is branded ‘MCP for Unity’.”

Also applies to: 171-189, 241-248

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between fb7ebfd and 64cd3f1.

⛔ Files ignored due to path filters (1)
  • UnityMcpBridge/UnityMcpServer~/src/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • CursorHelp.md (3 hunks)
  • README-DEV.md (4 hunks)
  • README.md (8 hunks)
  • UnityMcpBridge/UnityMcpServer~/src/pyproject.toml (1 hunks)
  • claude-chunk.md (2 hunks)
  • deploy-dev.bat (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • deploy-dev.bat
  • claude-chunk.md
🧰 Additional context used
🪛 LanguageTool
CursorHelp.md

[grammar] ~7-~7: There might be a mistake here.
Context: ...er connects or reports it “can’t start.” - Your %USERPROFILE%\\.cursor\\mcp.json ...

(QB_NEW_EN)


[grammar] ~75-~75: There might be a mistake here.
Context: ...ed override and will stop auto-rewrites. - If neither Links path exists, a reasonab...

(QB_NEW_EN)

README-DEV.md

[grammar] ~5-~5: There might be a mistake here.
Context: ...t. ## 🚀 Available Development Features ### ✅ Development Deployment Scripts Quick de...

(QB_NEW_EN)


[grammar] ~7-~7: There might be a mistake here.
Context: ...es ### ✅ Development Deployment Scripts Quick deployment and testing tools for M...

(QB_NEW_EN)


[grammar] ~11-~11: There might be a mistake here.
Context: ...y core changes. ### 🔄 Coming Soon - Development Mode Toggle: Built-in Unity...

(QB_NEW_EN)


[grammar] ~12-~12: There might be a mistake here.
Context: ...n Unity editor development features - Hot Reload System: Real-time code updat...

(QB_NEW_EN)


[grammar] ~13-~13: There might be a mistake here.
Context: ...de updates without Unity restarts - Plugin Development Kit: Tools for creat...

(QB_NEW_EN)


[grammar] ~13-~13: There might be a mistake here.
Context: ...t Kit**: Tools for creating custom MCP For Unity extensions - **Automated Testing S...

(QB_NEW_EN)


[grammar] ~14-~14: There might be a mistake here.
Context: ...ing custom MCP For Unity extensions - Automated Testing Suite: Comprehensive ...

(QB_NEW_EN)


[grammar] ~15-~15: There might be a mistake here.
Context: ...testing framework for contributions - Debug Dashboard: Advanced debugging and...

(QB_NEW_EN)


[grammar] ~15-~15: There might be a mistake here.
Context: ... Advanced debugging and monitoring tools --- ## Development Deployment Scripts These dep...

(QB_NEW_EN)


[grammar] ~99-~99: There might be a mistake here.
Context: ...y package cache path is correct - Check that MCP For Unity package is actually insta...

(QB_NEW_EN)

README.md

[grammar] ~18-~18: There might be a mistake here.
Context: ... within Unity. ## 💬 Join Our Community ### Discord ...

(QB_NEW_EN)


[grammar] ~138-~138: There might be a mistake here.
Context: ...WinGet Links shim) to avoid PATH issues. - Cursor / Windsurf [(help link)](ht...

(QB_NEW_EN)


[grammar] ~341-~341: There might be a mistake here.
Context: ...e status window: Window > MCP For Unity. - Restart Unity. - **MCP Client Not Connec...

(QB_NEW_EN)

🪛 markdownlint-cli2 (0.17.2)
README.md

130-130: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


138-138: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


138-138: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


139-139: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


139-139: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


309-309: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


341-341: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


341-341: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

🔇 Additional comments (5)
UnityMcpBridge/UnityMcpServer~/src/pyproject.toml (1)

2-2: Update downstream references for renamed distribution

Please update all remaining references to the old UnityMcpServer name to avoid broken scripts, docs, and path lookups:

  • Batch scripts
    • deploy-dev.bat (lines 10–15)
    • restore-dev.bat (lines 8–15)
  • Documentation
    • README-DEV.md (references to %LOCALAPPDATA%\Programs\UnityMCP\UnityMcpServer\src)
    • CursorHelp.md (paths under ...UnityMcpServer\src)
    • README.md (multiple code blocks pointing at UnityMcpServer/src)
  • C# code
    • Editor/Helpers/ServerPathResolver.cs (hard-coded “UnityMcpServer” folder names)
    • Editor/Helpers/ServerInstaller.cs (exception messages, copy logic for UnityMcpServer)
    • Editor/Windows/UnityMcpEditorWindow.cs (folder-picker labels and candidate names arrays)
  • Entry points & packaging
    • Verify pyproject.toml’s entry_points.console_scripts (no lingering “UnityMcpServer”).
    • CI/CD workflows, Docker tags, PyPI project name, and publish scripts.
  • Installation instructions
    • All pip install …UnityMcpServer occurrences in docs or scripts.

Also, bump the major version to signal this breaking change.

Run a global replace (e.g., rg -l 'UnityMcpServer' | xargs sed -i 's/UnityMcpServer/MCPForUnityServer/g') and manually verify contexts where you want to preserve spacing or capitalization.

README-DEV.md (1)

63-64: UI path update looks good.

“Window > MCP For Unity” matches the branding change.

CursorHelp.md (2)

18-23: UI steps reflect new menu path. LGTM.


24-24: No migration required for UnityMCP.UvPath
A search for any MCPForUnity.UvPath references returned no results— all code continues to read/write the UnityMCP.UvPath key. The documentation correctly reflects the active key and does not need a legacy‐key note or migration snippet.

README.md (1)

132-135: Auto-Setup section matches the rebranded menu path.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
README.md (1)

155-167: Align VSCode JSON example in README with implementation
The Editor’s WriteToConfig and ShowManualInstructionsWindow methods emit args in the order ["run","--directory",…,"server.py"] and include "type":"stdio". Update the snippet under VSCode (all OS):

• File: README.md (lines 155–167)

       "command": "uv",
-      "args": ["--directory","<ABSOLUTE_PATH_TO>/UnityMcpServer/src","run","server.py"],
+      "args": ["run","--directory","<ABSOLUTE_PATH_TO>/UnityMcpServer/src","server.py"],
+      "type": "stdio"
♻️ Duplicate comments (1)
README.md (1)

255-258: Previous cross-reference issue is resolved (now points to Step 2).

“Installation Step 3 → Step 2” fix looks good and matches where config is set.

🧹 Nitpick comments (14)
README.md (5)

1-1: Standardize branding to “MCP for Unity” (lowercase “for”) for consistency.

Several user-facing strings use “MCP For Unity” which conflicts with the chosen branding “MCP for Unity.” Aligning this avoids confusion and improves SEO consistency.

Apply this diff:

-# MCP For Unity ✨
+# MCP for Unity ✨
-MCP For Unity acts as a bridge, allowing AI assistants (like Claude, Cursor) to interact directly with your Unity Editor via a local **MCP (Model Context Protocol) Client**. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
+MCP for Unity acts as a bridge, allowing AI assistants (like Claude, Cursor) to interact directly with your Unity Editor via a local **MCP (Model Context Protocol) Client**. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
-**Get help, share ideas, and collaborate with other MCP For Unity developers!**  
+**Get help, share ideas, and collaborate with other MCP for Unity developers!**  
-MCP For Unity connects your tools using two components:
+MCP for Unity connects your tools using two components:
-1.  **MCP For Unity Bridge:** A Unity package running inside the Editor. (Installed via Package Manager).
-2.  **MCP For Unity Server:** A Python server that runs locally, communicating between the Unity Bridge and your MCP Client. (Installed manually).
+1.  **MCP for Unity Bridge:** A Unity package running inside the Editor. (Installed via Package Manager).
+2.  **MCP for Unity Server:** A Python server that runs locally, communicating between the Unity Bridge and your MCP Client. (Installed automatically by the package on first run or via Auto-Setup).
-**Flow:** `[Your LLM via MCP Client] <-> [MCP For Unity Server (Python)] <-> [MCP For Unity Bridge (Unity Editor)]`
+**Flow:** `[Your LLM via MCP Client] <-> [MCP for Unity Server (Python)] <-> [MCP for Unity Bridge (Unity Editor)]`
-1.  In Unity, go to `Window > MCP For Unity`.
+1.  In Unity, go to `Window > MCP for Unity`.
-1. **Open your Unity Project.** The MCP For Unity package should connect automatically. Check status via Window > MCP For Unity.
+1. **Open your Unity Project.** The MCP for Unity package should connect automatically. Check status via Window > MCP for Unity.
-2. **Start your MCP Client** (Claude, Cursor, etc.). It should automatically launch the MCP For Unity Server (Python) using the configuration from Installation Step 2.
+2. **Start your MCP Client** (Claude, Cursor, etc.). It should automatically launch the MCP for Unity Server (Python) using the configuration from Installation Step 2.

Also applies to: 16-16, 22-22, 52-56, 57-57, 132-132, 255-257


118-118: Typo: “Instal” → “Install”.

Minor copy fix.

-1.  Instal the [OpenUPM CLI](https://openupm.com/docs/getting-started-cli.html)
+1.  Install the [OpenUPM CLI](https://openupm.com/docs/getting-started-cli.html)

152-154: Add a short compatibility note about the server key “UnityMCP”.

Docs and code intentionally continue to use the JSON key/name “UnityMCP” (and variations) for compatibility (Cursor/Claude). Call this out once so users don’t think it’s a missed rename.

Insert a note near the JSON examples:

 <summary><strong>Click for Client-Specific JSON Configuration Snippets...</strong></summary>
 
+> Compatibility note: We still use the server key/name "UnityMCP" in client configs (JSON/CLI)
+> for now to avoid breaking existing setups. This does not affect branding or functionality.
+> We’ll document any future migration path if/when the key changes.

I can add a short “Compatibility keys” section in README/CHANGELOG if helpful.

Also applies to: 169-171, 193-209, 239-248


136-141: Markdown list style/indentation nits in “Client-specific troubleshooting”.

Normalize bullet style and indentation; this also appeases markdownlint MD004/MD007.

-  - **VSCode**: uses `Code/User/mcp.json` with top-level `servers.unityMCP` and `"type": "stdio"`. On Windows, MCP For Unity writes an absolute `uv.exe` (prefers WinGet Links shim) to avoid PATH issues.
-  - **Cursor / Windsurf** [(**help link**)](https://github.com/CoplayDev/unity-mcp/wiki/1.-Fix-Unity-MCP-and-Cursor,-VSCode-&-Windsurf): if `uv` is missing, the MCP For Unity window shows "uv Not Found" with a quick [HELP] link and a "Choose UV Install Location" button.
+* **VSCode**: uses `Code/User/mcp.json` with top-level `servers.unityMCP` and `"type": "stdio"`. On Windows, MCP for Unity writes an absolute `uv.exe` (prefers WinGet Links shim) to avoid PATH issues.
+* **Cursor / Windsurf** [(**help link**)](https://github.com/CoplayDev/unity-mcp/wiki/1.-Fix-Unity-MCP-and-Cursor,-VSCode-&-Windsurf): if `uv` is missing, the MCP for Unity window shows "uv Not Found" with a quick [HELP] link and a "Choose UV Install Location" button.

339-347: Minor copy and list-style consistency in Troubleshooting.

Unify list indentation and style; small copy nits.

-- **Unity Bridge Not Running/Connecting:**
-    - Ensure Unity Editor is open.
-    - Check the status window: Window > MCP For Unity.
-    - Restart Unity.
+* **Unity Bridge Not Running/Connecting:**
+  * Ensure Unity Editor is open.
+  * Check the status window: Window > MCP for Unity.
+  * Restart Unity.
-**MCP Client Not Connecting / Server Not Starting:**
+* **MCP Client Not Connecting / Server Not Starting:**
UnityMcpBridge/Editor/Windows/UnityMcpEditorWindow.cs (9)

1042-1044: Brand prefix in log message still “UnityMCP”. Switch to “MCP for Unity.”

Minor branding cleanup for logs; avoids confusion in Console filtering.

-                    UnityEngine.Debug.LogWarning("UnityMCP: VSCode mcp.json could not be parsed; rewriting servers block.");
+                    UnityEngine.Debug.LogWarning("MCP for Unity: VSCode mcp.json could not be parsed; rewriting servers block.");

1561-1576: Standardize log prefixes to “MCP for Unity”.

Two log lines use “MCP For Unity” (capital F). Align with chosen casing.

-                                    UnityEngine.Debug.Log($"MCP For Unity: Auto-updated MCP config for '{mcpClient.name}' to new path: {pythonDir}");
+                                    UnityEngine.Debug.Log($"MCP for Unity: Auto-updated MCP config for '{mcpClient.name}' to new path: {pythonDir}");
-                                UnityEngine.Debug.LogWarning($"MCP For Unity: Auto-config rewrite failed for '{mcpClient.name}': {ex.Message}");
+                                UnityEngine.Debug.LogWarning($"MCP for Unity: Auto-config rewrite failed for '{mcpClient.name}': {ex.Message}");

1595-1599: Consistent log prefix casing.

-                UnityEngine.Debug.LogError("MCP For Unity: Claude CLI not found. Set a path in this window or install the CLI, then try again.");
+                UnityEngine.Debug.LogError("MCP for Unity: Claude CLI not found. Set a path in this window or install the CLI, then try again.");

1625-1640: Clarify “UnityMCP already registered” and align tag casing.

Replace the stylized tag with plain “MCP for Unity” and clarify that “UnityMCP” is the server key retained for compatibility.

-                    UnityEngine.Debug.Log("<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: UnityMCP already registered with Claude Code.");
+                    UnityEngine.Debug.Log("<b><color=#2EA3FF>MCP for Unity</color></b>: UnityMCP server key already registered with Claude Code (retained for compatibility).");
-                    UnityEngine.Debug.LogError($"MCP For Unity: Failed to start Claude CLI.\n{stderr}\n{stdout}");
+                    UnityEngine.Debug.LogError($"MCP for Unity: Failed to start Claude CLI.\n{stderr}\n{stdout}");

1674-1677: Casing nit in log message.

-                    UnityEngine.Debug.Log("Claude CLI reports no MCP For Unity server via 'mcp get' - setting status to NotConfigured and aborting unregister.");
+                    UnityEngine.Debug.Log("Claude CLI reports no MCP for Unity server via 'mcp get' - setting status to NotConfigured and aborting unregister.");

1689-1693: Consistent log prefix casing.

-                    UnityEngine.Debug.Log($"MCP For Unity: Successfully removed MCP server: {serverName}");
+                    UnityEngine.Debug.Log($"MCP for Unity: Successfully removed MCP server: {serverName}");
-                UnityEngine.Debug.Log("MCP For Unity: MCP server successfully unregistered from Claude Code.");
+                UnityEngine.Debug.Log("MCP for Unity: MCP server successfully unregistered from Claude Code.");

Also applies to: 1711-1714


344-357: Dialog label still references “UnityMcpServer/src” without context.

Tiny UX polish: keep the actual folder name but debrand the title so it reads as guidance rather than product name.

-                        string picked = EditorUtility.OpenFolderPanel("Select UnityMcpServer/src", Application.dataPath, "");
+                        string picked = EditorUtility.OpenFolderPanel("Select server folder (UnityMcpServer/src)", Application.dataPath, "");

18-21: Optional: Rename class to reflect branding (non-breaking for users).

Class is still named UnityMcpEditorWindow. Not user-facing, but for codebase consistency consider renaming to MCPForUnityEditorWindow in a follow-up (update references and file name), or add a [FormerlySerializedAs]-style comment if Unity reflection is involved.

If you want, I can prep a follow-up PR script to find all references and apply a safe rename across Editor code and tests.


57-63: EditorPrefs keys retain “UnityMCP” prefix — document this for back-compat.

Keys like “UnityMCP.DebugLogs”, “UnityMCP_ScriptValidationLevel”, etc., are intentionally preserved. Note this in README/CHANGELOG to avoid confusion for integrators.

Would you like me to add a short “Compatibility keys” section to README/CHANGELOG summarizing these retained keys and their purpose?

Also applies to: 470-478, 1123-1126, 1445-1449, 1463-1467

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 64cd3f1 and bb452eb.

📒 Files selected for processing (3)
  • README.md (8 hunks)
  • UnityMcpBridge/Editor/Windows/UnityMcpEditorWindow.cs (13 hunks)
  • restore-dev.bat (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • restore-dev.bat
🧰 Additional context used
🪛 LanguageTool
README.md

[grammar] ~18-~18: There might be a mistake here.
Context: ... within Unity. ## 💬 Join Our Community ### Discord ...

(QB_NEW_EN)


[grammar] ~138-~138: There might be a mistake here.
Context: ...WinGet Links shim) to avoid PATH issues. - Cursor / Windsurf [(help link)](ht...

(QB_NEW_EN)


[grammar] ~341-~341: There might be a mistake here.
Context: ...e status window: Window > MCP For Unity. - Restart Unity. - **MCP Client Not Connec...

(QB_NEW_EN)

🪛 markdownlint-cli2 (0.17.2)
README.md

130-130: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


138-138: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


138-138: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


139-139: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


139-139: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


309-309: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


341-341: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


341-341: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

🔇 Additional comments (3)
README.md (1)

757-759: Verify that the wiki links using “Unity-MCP” slugs remain valid post-rebrand.

If the wiki gets renamed, these links may break. Keep slugs stable or add redirects.

Would you like me to scan the repo and generate a checklist of all external links pointing to the wiki so we can validate them?

Also applies to: 783-785

UnityMcpBridge/Editor/Windows/UnityMcpEditorWindow.cs (2)

47-51: Menu path updated to “Window/MCP for Unity” — good.

Matches the new branding and README updates.


231-235: Window title uses “MCP for Unity Editor” — good.

Consistent with menu path; user-facing text reflects new brand.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (6)
UnityMcpBridge/README.md (6)

54-55: Capitalization consistency: use “uv” (lowercase) consistently

Everywhere else “uv” is lowercase; keep the UI/action label consistent.

-    - Choose UV Install Location: If uv isn’t on PATH, select the uv binary.
+    - Choose uv Install Location: If uv isn’t on PATH, select the uv binary.

77-82: Grammar and style: clarify headings and avoid bare URLs

The bullets read incomplete (“Python or uv not:”) and markdownlint flags bare URLs. Suggest rewording and linkifying.

-## Troubleshooting
-- Python or `uv` not:
-  - Help: https://github.com/CoplayDev/unity-mcp/wiki/1.-Fix-Unity-MCP-and-Cursor,-VSCode-&-Windsurf
-- Claude CLI not found:
-  - Help: https://github.com/CoplayDev/unity-mcp/wiki/2.-Fix-Unity-MCP-and-Claude-Code
+## Troubleshooting
+- Python or `uv` not found:
+  - Help: [Fix MCP for Unity with Cursor, VS Code & Windsurf](https://github.com/CoplayDev/unity-mcp/wiki/1.-Fix-Unity-MCP-and-Cursor,-VSCode-&-Windsurf)
+- Claude CLI not found:
+  - Help: [Fix MCP for Unity and Claude Code](https://github.com/CoplayDev/unity-mcp/wiki/2.-Fix-Unity-MCP-and-Claude-Code)

31-36: Minor wording polish for action labels (optional)

Consider consistent capitalization and clearer phrasing for buttons/actions.

-  - Select server folder…: Choose the folder containing `server.py`.
-  - Verify again: Re-checks server presence.
-  - If Python isn’t detected, use “Open install instructions”.
+  - Select Server Folder…: Choose the folder containing `server.py`.
+  - Verify Again: Re-checks server presence.
+  - If Python isn’t detected, click “Open Install Instructions”.

50-53: Nit: angle-bracket placeholder is fine, but consider clarifying the directory

Slightly clearer for users unfamiliar with uv’s --directory semantics.

-      - Args: run --directory <pythonDir> server.py
+      - Args: run --directory <python project folder> server.py

27-30: Confirm defaults in README are accurate
The listed defaults in UnityMcpBridge/README.md (lines 27–30) match the code exactly:

  • Unity port = 6400 (DefaultPort in Editor/Helpers/PortManager.cs & unityPort in Editor/Data/DefaultServerConfig.cs)
  • MCP port = 6500 (mcpPort in Editor/Windows/UnityMcpEditorWindow.cs & DefaultServerConfig.cs)
  • Mode labels = “Auto”/“Standard” (via EditorGUILayout.LabelField in UnityMcpEditorWindow.cs)

Optional: you may note in the README that these values are defaults and can be overridden through the configuration classes.


16-16: Update server path in UnityMcpBridge/README.md

The server folder is now named UnityMcpServer~/src, so the current instruction is outdated. Please update:

  • UnityMcpBridge/README.md, line 16
-   - Select the server folder that contains `server.py` (UnityMcpServer/src).
+   - Select the server folder that contains `server.py` (UnityMcpServer~/src).

Or, to avoid hard-coding the exact folder name, use a generic placeholder:

-   - Select the server folder that contains `server.py` (UnityMcpServer/src).
+   - Select the server folder that contains `server.py` (e.g., path/to/UnityMcpServer/src).
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between bb452eb and 8c39022.

📒 Files selected for processing (1)
  • UnityMcpBridge/README.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
UnityMcpBridge/README.md

[grammar] ~13-~13: There might be a mistake here.
Context: ...ck start 1. Open Window > MCP for Unity. 2. Click “Auto-Setup”. 3. If prompted: -...

(QB_NEW_EN)


[grammar] ~16-~16: There might be a mistake here.
Context: ...ntains server.py (UnityMcpServer/src). - Install Python and/or uv if missing. ...

(QB_NEW_EN)


[grammar] ~30-~30: There might be a mistake here.
Context: ... Unity 6400, MCP Server 6500. - Actions: - Auto-Setup: Registers/updates your selec...

(QB_NEW_EN)


[grammar] ~39-~39: There might be a mistake here.
Context: ...all instructions”. --- ## Unity Bridge - Shows Running or Stopped with a status d...

(QB_NEW_EN)


[grammar] ~41-~41: There might be a mistake here.
Context: ...ss used by MCP clients to talk to Unity. - Tip: After Auto-Setup, the bridge may au...

(QB_NEW_EN)


[grammar] ~48-~48: There might be a mistake here.
Context: ...urf, Claude Code). - Per-client actions: - Cursor / VS Code / Windsurf: - Auto Config...

(QB_NEW_EN)


[grammar] ~49-~49: There might be a mistake here.
Context: ...ctions: - Cursor / VS Code / Windsurf: - Auto Configure: Writes/updates your conf...

(QB_NEW_EN)


[grammar] ~51-~51: There might be a mistake here.
Context: ...h the server via uv: - Command: uv - Args: run --directory server...

(QB_NEW_EN)


[grammar] ~52-~52: There might be a mistake here.
Context: ...s: run --directory server.py - Manual Setup: Opens a window with a pre-...

(QB_NEW_EN)


[grammar] ~53-~53: There might be a mistake here.
Context: ...t to copy/paste into your client config. - Choose UV Install Location: If uv isn’t ...

(QB_NEW_EN)


[grammar] ~54-~54: There might be a mistake here.
Context: ... uv isn’t on PATH, select the uv binary. - A compact “Config:” line shows the resol...

(QB_NEW_EN)


[grammar] ~55-~55: There might be a mistake here.
Context: ...g file name once uv/server are detected. - Claude Code: - Register with Claude ...

(QB_NEW_EN)


[grammar] ~61-~61: There might be a mistake here.
Context: ...d Claude CLI path when detected. Notes: - The UI shows a status dot and a short st...

(QB_NEW_EN)


[grammar] ~62-~62: There might be a mistake here.
Context: ...d”, “uv Not Found”, “Claude Not Found”). - Use “Auto Configure” for one-click setup...

(QB_NEW_EN)


[grammar] ~67-~67: There might be a mistake here.
Context: .../copy config. --- ## Script Validation - Validation Level options: - Basic — On...

(QB_NEW_EN)


[grammar] ~69-~69: There might be a mistake here.
Context: ...n - Validation Level options: - Basic — Only syntax checks - Standard — Syntax + U...

(QB_NEW_EN)


[grammar] ~72-~72: There might be a mistake here.
Context: ...ll semantic validation (requires Roslyn) - Pick a level based on your project’s nee...

(QB_NEW_EN)


[grammar] ~77-~77: There might be a mistake here.
Context: ...r the dropdown. --- ## Troubleshooting - Python or uv not: - Help: https://gi...

(QB_NEW_EN)


[grammar] ~78-~78: There might be a mistake here.
Context: ...## Troubleshooting - Python or uv not: - Help: https://github.com/CoplayDev/unity...

(QB_NEW_EN)


[grammar] ~79-~79: There might be a mistake here.
Context: ...-Unity-MCP-and-Cursor,-VSCode-&-Windsurf - Claude CLI not found: - Help: https://...

(QB_NEW_EN)


[grammar] ~80-~80: There might be a mistake here.
Context: ...SCode-&-Windsurf - Claude CLI not found: - Help: https://github.com/CoplayDev/unity...

(QB_NEW_EN)


[grammar] ~85-~85: There might be a mistake here.
Context: ...-Unity-MCP-and-Claude-Code --- ## Tips - Enable “Show Debug Logs” in the header f...

(QB_NEW_EN)

🪛 markdownlint-cli2 (0.17.2)
UnityMcpBridge/README.md

79-79: Bare URL used

(MD034, no-bare-urls)


81-81: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (3)
UnityMcpBridge/README.md (3)

57-60: Documentation is correct: CLI registration key remains UnityMCP

The codebase still uses “UnityMCP” as the identifier for Claude CLI registration/unregistration, so the README text is accurate and should not be renamed. Key usages include:

  • UnityMcpEditorWindow.cs:1606 – constructs claude mcp add UnityMCP …
  • ExecPath.cs – Pref key UnityMCP.ClaudeCliPath
  • Candidate names for claude mcp get: includes "UnityMCP", "unityMCP", "unity-mcp"
  • EditorPrefs keys: "UnityMCP.DebugLogs", "UnityMCP.PythonDirOverride", etc.

No changes required.

Likely an incorrect or invalid review comment.


68-73: Strict validation level is correctly implemented and labeled

The code defines ValidationLevel.Strict, maps it in the UI dropdown as “Full semantic validation (requires Roslyn)”, and gates Roslyn-based analyses behind #if USE_ROSLYN. The README’s description matches the implementation—no experimental disclaimer is needed.


6-6: Menu path matches documentation – no changes needed

The [MenuItem("Window/MCP for Unity")] attribute and GetWindow<UnityMcpEditorWindow>("MCP for Unity") call correctly implement the Window > MCP for Unity menu entry as documented in the README.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
UnityMcpBridge/Editor/Helpers/ServerInstaller.cs (1)

262-269: Preserve user overrides by reading legacy EditorPrefs key as fallback

Users who set “UnityMCP.UvPath” will lose their override after this change. Read the legacy key if the new key is empty.

-                string overridePath = EditorPrefs.GetString("MCPForUnity.UvPath", string.Empty);
+                string overridePath = EditorPrefs.GetString("MCPForUnity.UvPath", string.Empty);
+                if (string.IsNullOrEmpty(overridePath))
+                {
+                    // Backward-compat: honor legacy override if present
+                    overridePath = EditorPrefs.GetString("UnityMCP.UvPath", string.Empty);
+                }
                 if (!string.IsNullOrEmpty(overridePath) && File.Exists(overridePath))
                 {
                     if (ValidateUvBinary(overridePath)) return overridePath;
                 }
♻️ Duplicate comments (1)
README.md (1)

257-257: Cross-reference fixed.

“Installation Step 2” is the correct reference for the MCP Client configuration. Thanks for addressing this.

🧹 Nitpick comments (15)
README-DEV.md (2)

37-38: Verify user-facing default paths/backups align with rebrand (keep backward compatibility)

Defaults still reference “UnityMCP” and “unity-mcp-backup”. If that’s intentional for compatibility (matching ServerInstaller RootFolder = UnityMCP), keep as-is. Otherwise, consider updating backup naming to “mcp-for-unity-backup” while confirming restore scripts and docs reflect it.


97-100: Minor grammar tweak

“is actually installed” → “is installed” for brevity.

- - Check that MCP for Unity package is actually installed
+ - Check that the MCP for Unity package is installed
UnityMcpBridge/README.md (1)

56-60: Update “Unregister” label to match new branding

The label still says “UnityMCP”. Align with “MCP for Unity”.

-    - Register with Claude Code / Unregister UnityMCP with Claude Code.
+    - Register with Claude Code / Unregister MCP for Unity from Claude Code.
UnityMcpBridge/Editor/UnityMcpBridge.cs (3)

40-43: Preserve debug preference for existing users (fallback to old key)

Changing the EditorPrefs key breaks existing user settings for debug logs. Read the new key first, then fall back to the legacy “UnityMCP.DebugLogs”.

-            try { return EditorPrefs.GetBool("MCPForUnity.DebugLogs", false); } catch { return false; }
+            try
+            {
+                // New key (preferred)
+                if (EditorPrefs.HasKey("MCPForUnity.DebugLogs"))
+                    return EditorPrefs.GetBool("MCPForUnity.DebugLogs", false);
+                // Legacy fallback for existing users
+                if (EditorPrefs.HasKey("UnityMCP.DebugLogs"))
+                    return EditorPrefs.GetBool("UnityMCP.DebugLogs", false);
+            }
+            catch { }
+            return false;

706-723: Heartbeat path still uses “.unity-mcp” and “unity-mcp-status-*.json” — confirm compatibility intent

If external clients (Cursor/VS Code/Windsurf/Claude Code) rely on these names, keeping them unchanged is correct. If not, consider a controlled migration with backward-compatible reads.


417-427: Duplicate “ping” handling (minor)

Ping is special-cased in both the socket reader and the command processor. Not harmful, but consolidating to one handling path reduces drift.

Also applies to: 486-501

UnityMcpBridge/Editor/Helpers/ServerInstaller.cs (1)

97-110: Unused helper (very minor)

IsDirectoryWritable isn’t referenced. If not used elsewhere, consider removing to reduce noise.

CursorHelp.md (2)

24-24: Leftover old branding: “UnityMCP” in explanatory sentence.

This line should use “MCP for Unity” (the product) instead of “UnityMCP”.

-This sets an override stored in the Editor (key: `MCPForUnity.UvPath`) so UnityMCP won’t auto-rewrite the config back to a different `uv.exe` later.
+This sets an override stored in the Editor (key: `MCPForUnity.UvPath`) so MCP for Unity won’t auto-rewrite the config back to a different `uv.exe` later.

7-8: Minor grammar polish for clarity.

Consider tightening these bullets:

-- Cursor shows the MCP for Unity server but never connects or reports it “can’t start.”
+- Cursor shows the MCP for Unity server but never connects, or reports that it “can’t start.”
 
-- Your `%USERPROFILE%\\.cursor\\mcp.json` flips back to a different `command` path when Unity or the MCP for Unity window refreshes.
+- Your `%USERPROFILE%\\.cursor\\mcp.json` flips back to a different `command` path when Unity or the MCP for Unity window refreshes.
README.md (1)

138-141: Standardize list style and add a quick compatibility note.

  • Use consistent bullet style to satisfy markdownlint (MD004/MD007).
  • Add a brief note that the JSON key “unityMCP” is retained for client compatibility.
-  - **VSCode**: uses `Code/User/mcp.json` with top-level `servers.unityMCP` and `"type": "stdio"`. On Windows, MCP for Unity writes an absolute `uv.exe` (prefers WinGet Links shim) to avoid PATH issues.
-  - **Cursor / Windsurf** [(**help link**)](https://github.com/CoplayDev/unity-mcp/wiki/1.-Fix-Unity-MCP-and-Cursor,-VSCode-&-Windsurf): if `uv` is missing, the MCP for Unity window shows "uv Not Found" with a quick [HELP] link and a "Choose `uv` Install Location" button.
+  * **VSCode**: uses `Code/User/mcp.json` with top-level `servers.unityMCP` and `"type": "stdio"`. On Windows, MCP for Unity writes an absolute `uv.exe` (prefers WinGet Links shim) to avoid PATH issues.  
+    Note: The `unityMCP` key is retained for client compatibility.
+  * **Cursor / Windsurf** [(**help link**)](https://github.com/CoplayDev/unity-mcp/wiki/1.-Fix-Unity-MCP-and-Cursor,-VSCode-&-Windsurf): if `uv` is missing, the MCP for Unity window shows "uv Not Found" with a quick [HELP] link and a "Choose `uv` Install Location" button.
UnityMcpBridge/Editor/Helpers/PackageInstaller.cs (1)

12-22: Renamed install flag key will re-run first-run logic; consider migrating old key.

Changing the EditorPrefs key to “MCPForUnity.ServerInstalled” will trigger the first-run install for existing users (possibly desired). If not intentional, migrate any previous key(s) once to avoid redundant installs.

-        private const string InstallationFlagKey = "MCPForUnity.ServerInstalled";
+        private const string InstallationFlagKey = "MCPForUnity.ServerInstalled";
+        // Optional: legacy keys to migrate (best-effort; adjust if your old key differs)
+        private static readonly string[] LegacyInstallationKeys =
+        {
+            "UnityMcpBridge.ServerInstalled",
+            "UnityMCP.ServerInstalled"
+        };
@@
         static PackageInstaller()
         {
-            // Check if this is the first time the package is loaded
-            if (!EditorPrefs.GetBool(InstallationFlagKey, false))
+            // One-time migration of legacy flags to preserve state
+            try
+            {
+                foreach (var legacy in LegacyInstallationKeys)
+                {
+                    if (EditorPrefs.GetBool(legacy, false))
+                    {
+                        EditorPrefs.SetBool(InstallationFlagKey, true);
+                        break;
+                    }
+                }
+            } catch { /* non-fatal */ }
+
+            // Check if this is the first time the package is loaded
+            if (!EditorPrefs.GetBool(InstallationFlagKey, false))
             {
                 // Schedule the installation for after Unity is fully loaded
                 EditorApplication.delayCall += InstallServerOnFirstLoad;
             }
         }

Would you like me to scan for the exact legacy flag name in the repo and adjust the migration list?

UnityMcpBridge/Editor/Windows/UnityMcpEditorWindow.cs (4)

1425-1468: Migrate validation-level prefs to MCPForUnity while preserving old values.

You’re using “UnityMCP_ScriptValidationLevel” in new code. For the major version bump you mentioned, consider migrating to a new key and reading both to preserve user settings.

Minimal change: read from MCPForUnity first, fall back to UnityMCP; write both for one release to smooth the transition.

-            string savedLevel = EditorPrefs.GetString("UnityMCP_ScriptValidationLevel", "standard");
+            string savedLevel = EditorPrefs.GetString(
+                "MCPForUnity_ScriptValidationLevel",
+                EditorPrefs.GetString("UnityMCP_ScriptValidationLevel", "standard")
+            );
@@
-            EditorPrefs.SetString("UnityMCP_ScriptValidationLevel", levelString);
+            // Write both keys during a transition period
+            EditorPrefs.SetString("MCPForUnity_ScriptValidationLevel", levelString);
+            EditorPrefs.SetString("UnityMCP_ScriptValidationLevel", levelString);
@@
-            string savedLevel = EditorPrefs.GetString("UnityMCP_ScriptValidationLevel", "standard");
+            string savedLevel = EditorPrefs.GetString(
+                "MCPForUnity_ScriptValidationLevel",
+                EditorPrefs.GetString("UnityMCP_ScriptValidationLevel", "standard")
+            );

Optionally, after one release, drop the UnityMCP write and keep only MCPForUnity.


1626-1626: Clarify log text while preserving the registered server name.

User-facing log still reads “UnityMCP already registered…”. Consider clarifying that it’s the server identifier while keeping brand-neutral wording.

-                    UnityEngine.Debug.Log("<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: UnityMCP already registered with Claude Code.");
+                    UnityEngine.Debug.Log("<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: MCP for Unity server (UnityMCP) is already registered with Claude Code.");

789-796: Prefer WinGet Links shim as default chooser location on Windows.

This aligns with the guidance in your docs and avoids fragile paths.

-                    string suggested = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "/opt/homebrew/bin" : Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
+                    string suggested = RuntimeInformation.IsOSPlatform(OSPlatform.OSX)
+                        ? "/opt/homebrew/bin"
+                        : System.IO.Path.Combine(
+                            Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
+                            "Microsoft", "WinGet", "Links"
+                          );

1755-1833: Duplicate UV resolution logic — consider centralizing.

This method substantially overlaps with ServerInstaller.FindUvPath()/ExecPath.ResolveUv(). Centralizing reduces drift and bug surface across platforms.

  • Option A: Replace body with a wrapper that calls ExecPath.ResolveUv() and adds your UI-specific error messaging.
  • Option B: Delete this method; adjust call sites to ExecPath.ResolveUv().

If desired, I can provide a patch consolidating call sites.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8c39022 and 84a3ff4.

📒 Files selected for processing (16)
  • CursorHelp.md (3 hunks)
  • README-DEV.md (5 hunks)
  • README.md (9 hunks)
  • UnityMcpBridge/Editor/Helpers/ExecPath.cs (1 hunks)
  • UnityMcpBridge/Editor/Helpers/PackageInstaller.cs (2 hunks)
  • UnityMcpBridge/Editor/Helpers/PortManager.cs (7 hunks)
  • UnityMcpBridge/Editor/Helpers/ServerInstaller.cs (4 hunks)
  • UnityMcpBridge/Editor/Helpers/ServerPathResolver.cs (2 hunks)
  • UnityMcpBridge/Editor/UnityMcpBridge.cs (5 hunks)
  • UnityMcpBridge/Editor/Windows/UnityMcpEditorWindow.cs (26 hunks)
  • UnityMcpBridge/README.md (1 hunks)
  • UnityMcpBridge/UnityMcpServer~/src/server.py (4 hunks)
  • UnityMcpBridge/UnityMcpServer~/src/unity_connection.py (1 hunks)
  • claude-chunk.md (2 hunks)
  • deploy-dev.bat (1 hunks)
  • restore-dev.bat (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • restore-dev.bat
  • UnityMcpBridge/UnityMcpServer~/src/unity_connection.py
🚧 Files skipped from review as they are similar to previous changes (5)
  • deploy-dev.bat
  • claude-chunk.md
  • UnityMcpBridge/Editor/Helpers/ExecPath.cs
  • UnityMcpBridge/Editor/Helpers/PortManager.cs
  • UnityMcpBridge/Editor/Helpers/ServerPathResolver.cs
🧰 Additional context used
🧬 Code Graph Analysis (3)
UnityMcpBridge/Editor/Helpers/PackageInstaller.cs (1)
UnityMcpBridge/Editor/Helpers/ServerInstaller.cs (2)
  • ServerInstaller (10-448)
  • EnsureServerInstalled (19-58)
UnityMcpBridge/Editor/UnityMcpBridge.cs (1)
UnityMcpBridge/Editor/Helpers/PortManager.cs (1)
  • IsDebugEnabled (19-23)
UnityMcpBridge/Editor/Windows/UnityMcpEditorWindow.cs (2)
UnityMcpBridge/Editor/Helpers/ServerInstaller.cs (2)
  • ServerInstaller (10-448)
  • RepairPythonEnvironment (156-257)
UnityMcpBridge/Editor/Helpers/ExecPath.cs (2)
  • ExecPath (11-277)
  • ResolveClaude (16-89)
🪛 LanguageTool
CursorHelp.md

[grammar] ~7-~7: There might be a mistake here.
Context: ...Typical symptoms - Cursor shows the MCP for Unity server but never connects or repo...

(QB_NEW_EN)


[grammar] ~7-~7: There might be a mistake here.
Context: ...er connects or reports it “can’t start.” - Your %USERPROFILE%\\.cursor\\mcp.json ...

(QB_NEW_EN)


[grammar] ~75-~75: There might be a mistake here.
Context: ...ed override and will stop auto-rewrites. - If neither Links path exists, a reasonab...

(QB_NEW_EN)

README-DEV.md

[grammar] ~5-~5: There might be a mistake here.
Context: ...t. ## 🚀 Available Development Features ### ✅ Development Deployment Scripts Quick de...

(QB_NEW_EN)


[grammar] ~7-~7: There might be a mistake here.
Context: ...es ### ✅ Development Deployment Scripts Quick deployment and testing tools for M...

(QB_NEW_EN)


[grammar] ~11-~11: There might be a mistake here.
Context: ...y core changes. ### 🔄 Coming Soon - Development Mode Toggle: Built-in Unity...

(QB_NEW_EN)


[grammar] ~12-~12: There might be a mistake here.
Context: ...n Unity editor development features - Hot Reload System: Real-time code updat...

(QB_NEW_EN)


[grammar] ~13-~13: There might be a mistake here.
Context: ...de updates without Unity restarts - Plugin Development Kit: Tools for creat...

(QB_NEW_EN)


[grammar] ~14-~14: There might be a mistake here.
Context: ...ing custom MCP for Unity extensions - Automated Testing Suite: Comprehensive ...

(QB_NEW_EN)


[grammar] ~15-~15: There might be a mistake here.
Context: ...testing framework for contributions - Debug Dashboard: Advanced debugging and...

(QB_NEW_EN)


[grammar] ~15-~15: There might be a mistake here.
Context: ... Advanced debugging and monitoring tools --- ## Development Deployment Scripts These dep...

(QB_NEW_EN)


[grammar] ~99-~99: There might be a mistake here.
Context: ...y package cache path is correct - Check that MCP for Unity package is actually insta...

(QB_NEW_EN)

README.md

[grammar] ~18-~18: There might be a mistake here.
Context: ... within Unity. ## 💬 Join Our Community ### Discord ...

(QB_NEW_EN)

UnityMcpBridge/README.md

[grammar] ~13-~13: There might be a mistake here.
Context: ...ck start 1. Open Window > MCP for Unity. 2. Click “Auto-Setup”. 3. If prompted: -...

(QB_NEW_EN)


[grammar] ~16-16: There might be a mistake here.
Context: ...tains server.py (UnityMcpServer
/src). - Install Python and/or uv if missing. ...

(QB_NEW_EN)


[grammar] ~30-~30: There might be a mistake here.
Context: ...ries; shown in UI), MCP 6500. - Actions: - Auto-Setup: Registers/updates your selec...

(QB_NEW_EN)


[grammar] ~39-~39: There might be a mistake here.
Context: ...all Instructions”. --- ## Unity Bridge - Shows Running or Stopped with a status d...

(QB_NEW_EN)


[grammar] ~41-~41: There might be a mistake here.
Context: ...ss used by MCP clients to talk to Unity. - Tip: After Auto-Setup, the bridge may au...

(QB_NEW_EN)


[grammar] ~48-~48: There might be a mistake here.
Context: ...urf, Claude Code). - Per-client actions: - Cursor / VS Code / Windsurf: - Auto Config...

(QB_NEW_EN)


[grammar] ~49-~49: There might be a mistake here.
Context: ...ctions: - Cursor / VS Code / Windsurf: - Auto Configure: Writes/updates your conf...

(QB_NEW_EN)


[grammar] ~51-~51: There might be a mistake here.
Context: ...h the server via uv: - Command: uv - Args: run --directory server...

(QB_NEW_EN)


[grammar] ~52-~52: There might be a mistake here.
Context: ...s: run --directory server.py - Manual Setup: Opens a window with a pre-...

(QB_NEW_EN)


[grammar] ~53-~53: There might be a mistake here.
Context: ...t to copy/paste into your client config. - Choose uv Install Location: If uv isn’...

(QB_NEW_EN)


[grammar] ~55-~55: There might be a mistake here.
Context: ...g file name once uv/server are detected. - Claude Code: - Register with Claude ...

(QB_NEW_EN)


[grammar] ~61-~61: There might be a mistake here.
Context: ...d Claude CLI path when detected. Notes: - The UI shows a status dot and a short st...

(QB_NEW_EN)


[grammar] ~62-~62: There might be a mistake here.
Context: ...d”, “uv Not Found”, “Claude Not Found”). - Use “Auto Configure” for one-click setup...

(QB_NEW_EN)


[grammar] ~67-~67: There might be a mistake here.
Context: .../copy config. --- ## Script Validation - Validation Level options: - Basic — On...

(QB_NEW_EN)


[grammar] ~69-~69: There might be a mistake here.
Context: ...n - Validation Level options: - Basic — Only syntax checks - Standard — Syntax + U...

(QB_NEW_EN)


[grammar] ~72-~72: There might be a mistake here.
Context: ...ll semantic validation (requires Roslyn) - Pick a level based on your project’s nee...

(QB_NEW_EN)


[grammar] ~77-~77: There might be a mistake here.
Context: ...r the dropdown. --- ## Troubleshooting - Python or uv not found: - Help: [Fix...

(QB_NEW_EN)


[grammar] ~78-~78: There might be a mistake here.
Context: ...ubleshooting - Python or uv not found: - Help: [Fix MCP for Unity with Cursor, VS...

(QB_NEW_EN)


[grammar] ~79-~79: There might be a mistake here.
Context: ...or Unity with Cursor, VS Code & Windsurf](https://github.com/CoplayDev/unity-mcp/wiki/1.-Fix-Unity-MCP-and-Cursor,-VSCode-&-Windsurf) - Claude CLI not found: - Help: [Fix MCP...

(QB_NEW_EN)


[grammar] ~80-~80: There might be a mistake here.
Context: ...Code-&-Windsurf) - Claude CLI not found: - Help: [Fix MCP for Unity with Claude Cod...

(QB_NEW_EN)


[grammar] ~85-~85: There might be a mistake here.
Context: ...Unity-MCP-and-Claude-Code) --- ## Tips - Enable “Show Debug Logs” in the header f...

(QB_NEW_EN)

🪛 markdownlint-cli2 (0.17.2)
README.md

130-130: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


138-138: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


138-138: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


139-139: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


139-139: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


309-309: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


341-341: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


341-341: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

🔇 Additional comments (18)
README-DEV.md (1)

1-3: Brand rename reads consistently and clearly

Intro and positioning reflect the “MCP for Unity” branding well. No API implications here.

UnityMcpBridge/README.md (1)

1-9: Good, consistent editor UI branding

“Window > MCP for Unity” and section names read consistently across the doc.

UnityMcpBridge/Editor/UnityMcpBridge.cs (4)

13-18: Namespace and using updates look correct

References moved to MCPForUnity.* namespaces without functional changes. Matches the broader rebrand.


228-232: Log message branding change: LGTM

Message reads clearly and matches the new tag style.


311-315: Startup log branding: LGTM

No functional change; improved clarity for users.


344-351: Stop log branding: LGTM

Shutdown message aligned with new branding.

UnityMcpBridge/Editor/Helpers/ServerInstaller.cs (3)

8-14: Namespace migration: LGTM; confirm install root naming

Namespace shift is correct. RootFolder = "UnityMCP" and ServerFolder = "UnityMcpServer" remain unchanged — likely intentional to avoid breaking existing installs and docs. Confirm that this is the desired backward-compat stance.


50-53: User-facing warning text updated: LGTM

Branding reads as “MCP for Unity” — matches PR objective.


249-251: Success log branding: LGTM

No functional change; consistent messaging.

UnityMcpBridge/UnityMcpServer~/src/server.py (3)

24-31: Startup handling improved: LGTM

Graceful connection attempt with warning fallback is a good robustness improvement.


39-39: Shutdown log branding: LGTM

Consistent with startup change.


55-69: Docstring and help text: LGTM

Branding and tone are consistent; no functional change.

CursorHelp.md (1)

18-22: UI path and CTA renames look good.

“Window > MCP for Unity” and “Choose uv Install Location” align with the new branding and the Editor UI.

README.md (1)

255-255: Status path rename looks good.

“Check status via Window > MCP for Unity.” matches the new menu path.

UnityMcpBridge/Editor/Helpers/PackageInstaller.cs (1)

28-40: Branding/log updates LGTM.

Messages are consistent with the new product name and are actionable for users.

UnityMcpBridge/Editor/Windows/UnityMcpEditorWindow.cs (3)

47-51: Menu path/title rename is correct.

Window registration and title now align with “MCP for Unity”.


59-61: Prefs key prefix rename is consistent.

AutoRegisterEnabled and DebugLogs now use MCPForUnity.* keys. Good.


1-1: No lingering “Unity MCP” user-facing strings detected

A case-sensitive sweep across .cs, .md, and .json files returned zero matches for “Unity MCP” or menu entries like “Window > Unity MCP.” The codebase is clear of any stray occurrences.

@msanatan
Copy link
Contributor Author

@dsarno @Scriptwonder OK, the asset store is ready to go.

What's changed?

  • Project's package display name and UI is now "MCP for Unity".
  • Assembly definitions are now named MCPForUnity
  • Project namespace is now MCPForUnity.
  • Editor prefs are also now MCPForUnity.
  • Logs are now prepended with MCP-FOR-UNITY
  • Server logger is now named mcp-for-unity-server
  • Main class names (Unity sees this upon installation)
  • There is a README in the plugin's directory, required for the asset store (see Add user README inside plugin folder #224)

What's not changed, to ensure nothing breaks with existing installations

  • Package name, we recently changed it. If Unity tells us to change it, sure, but the package has an organization name that's a suitable differentiator.
  • Folder names for the plugin and server
  • The folder where the server is installed, so users who upgrade can continue working
    • Why do we install it since it's now embedded in the plugin?
  • The name used in the MCP config is still unityMCP

I think this is a decent line between ensuring we're complying and avoiding major disruptions for users.

Can you have a quick look at it?

Also @dsarno, I know you're working on some large branches, if you get any conflicts share them with me and I'll aim to resolve. For the most part, name changes should be OK

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (19)
CursorHelp.md (3)

4-4: Tighten phrasing and unify capitalization of “server”.
The sentence reads a bit clunky; this improves readability and keeps “server” lowercase for consistency with other occurrences.

- Some Windows machines have multiple `uv.exe` locations. Our auto-config sometimes picked a less stable path, causing the MCP client to fail to launch the MCP for Unity Server or for the path to be auto-rewritten on repaint/restart.
+ Some Windows machines have multiple `uv.exe` locations. Our auto-config sometimes picked a less stable path, which causes the MCP client to fail to launch the MCP for Unity server, or the path is auto-rewritten on repaint/restart.

7-7: Fix minor grammar in symptom bullet.
Add the subject after the conjunction and normalize the quoted message case.

- - Cursor shows the MCP for Unity server but never connects or reports it “can’t start.”
+ - Cursor shows the MCP for Unity server but never connects, or it reports “Can’t start.”

75-75: Fix branding/capitalization: “unity window” → “MCP for Unity window”.
Keeps terminology consistent with the rest of the doc.

- - If the unity window keeps rewriting to a different `uv.exe`, pick the Links shim again; MCP for Unity saves a pinned override and will stop auto-rewrites.
+ - If the MCP for Unity window keeps rewriting to a different `uv.exe`, pick the Links shim again; MCP for Unity saves a pinned override and will stop auto-rewrites.
UnityMcpBridge/README.md (7)

15-19: Clarify embedded server and prereqs in Quick Start.

Reduce confusion when the server is embedded and be explicit about versions/links.

Apply this diff:

 3. If prompted:
-   - Select the server folder that contains `server.py` (UnityMcpServer~/src).
-   - Install Python and/or uv if missing.
-   - For Claude Code, ensure the `claude` CLI is installed.
+   - Select the server folder that contains `server.py` (e.g., UnityMcpServer~/src).
+     - If the server is embedded, this may be pre-selected for you.
+   - Install Python and/or uv if missing (Python 3.10+ recommended; uv latest).
+     - Python: https://www.python.org/downloads/
+     - uv: https://docs.astral.sh/uv/
+   - For Claude Code, ensure the `claude` CLI is installed:
+     https://docs.anthropic.com/claude/docs/claude-code

28-28: Briefly define “Auto” vs “Standard” modes.

A one-liner here saves users a trip to other docs.

Apply this diff:

   - Mode: Auto or Standard.
+    - Auto: MCP for Unity auto-detects and starts the bridge/server as needed.
+    - Standard: You control start/stop and client config manually.

32-32: Scope where .venv is deleted.

Minor clarity so users don’t fear losing other environments.

Apply this diff:

-  - Repair Python Env: Rebuilds a clean Python environment (deletes `.venv`, runs `uv sync`).
+  - Repair Python Env: Rebuilds a clean Python environment in the server folder (deletes that folder’s `.venv`, runs `uv sync`).

51-52: Rename placeholder to for accuracy.

The directory is the server folder, not a generic “pythonDir”.

Apply this diff:

-      - Command: uv
-      - Args: run --directory <pythonDir> server.py
+      - Command: uv
+      - Args: run --directory <serverDir> server.py
+        (where <serverDir> is the folder containing server.py)

57-59: Add link and clarify Claude registration effect.

Helps users understand what “Register” actually changes.

Apply this diff:

   - Claude Code:
-    - Register with Claude Code / Unregister MCP for Unity with Claude Code.
+    - Register with Claude Code / Unregister MCP for Unity with Claude Code.
+      This adds/removes the MCP for Unity server entry in Claude Code’s MCP configuration.
+      Docs: https://docs.anthropic.com/claude/docs/claude-code

61-64: Add a short compatibility note about the unchanged config key.

Preempts confusion for existing users seeing “unityMCP” in configs.

Apply this diff:

 Notes:
 - The UI shows a status dot and a short status text (e.g., “Configured”, “uv Not Found”, “Claude Not Found”).
 - Use “Auto Configure” for one-click setup; use “Manual Setup” when you prefer to review/copy config.
+ - Compatibility: Existing configs may still use the key `unityMCP`. This is expected and supported.

68-73: Set expectations for “Strict” validation requirements.

Call out that extra packages/config may be needed and that it’s slower.

Apply this diff:

   - Strict — Full semantic validation (requires Roslyn)
- - Pick a level based on your project’s needs. A description is shown under the dropdown.
+ - Pick a level based on your project’s needs. A description is shown under the dropdown.
+   Note: “Strict” may require additional analyzer packages/configuration and can be slower on large projects.
UnityMcpBridge/Editor/MCPForUnityBridge.cs (3)

337-351: Stop() heartbeat reason is ambiguous; pass “stopped” for clearer state.

WriteHeartbeat(false) defaults reason to “ready”, which can be misleading on Stop(). Recommend passing an explicit reason.

-                    // Mark heartbeat one last time before stopping
-                    WriteHeartbeat(false);
+                    // Mark heartbeat one last time before stopping
+                    WriteHeartbeat(false, "stopped");

706-723: Heartbeat file path still uses ~/.unity-mcp — confirm intentional back-compat or dual-write for migration.

If external tools watch this path, keeping it is fine. Otherwise, consider dual-writing to a new path (e.g. ~/.mcp-for-unity/mcp-for-unity-status-*.json) for a deprecation window.

Would you like a follow-up PR to dual-write and later remove the legacy path?


449-562: Heavy command processing is done under a global lock — reduce lock contention.

JSON parsing, command execution, and serialization happen while holding lockObj. This can block incoming client enqueues and editor updates, especially with slow handlers.

Consider snapshotting the queue under lock, then processing outside the lock, and removing results afterward. Example approach:

  • Under lock: handle heartbeat timing, copy commandQueue to a local list, then release the lock.
  • Process each command outside the lock.
  • Under lock: remove processed ids.

This reduces UI stalls and improves concurrency safety around tcs.SetResult. I can draft a concrete refactor if you want to move in this direction.

UnityMcpBridge/Editor/Windows/MCPForUnityEditorWindow.cs (6)

307-316: Nit: Drop the global:: qualifier.

The fully-qualified global:: prefix is unnecessary here and hurts readability.

-                    bool ok = global::MCPForUnity.Editor.Helpers.ServerInstaller.RepairPythonEnvironment();
+                    bool ok = MCPForUnity.Editor.Helpers.ServerInstaller.RepairPythonEnvironment();

471-520: First-run auto-setup branding and keys updated — LGTM.

One small ask: if StartAutoConnect throws, you log a warning (good). Optionally consider surfacing a transient UI status to guide the user to open the server section.

Also applies to: 515-520, 530-533


818-833: User-facing button still says “Unregister UnityMCP with Claude Code”.

Given the branding shift, consider clarifying the label while preserving the server id:

-                    string buttonText = isConfigured ? "Unregister UnityMCP with Claude Code" : "Register with Claude Code";
+                    string buttonText = isConfigured ? "Unregister MCP for Unity (UnityMCP) from Claude Code" : "Register with Claude Code";

Rationale: keeps user-facing language aligned with “MCP for Unity” while acknowledging the legacy server name UnityMCP that Claude stores.

Also applies to: 845-862


719-731: uv discovery duplicates logic from ExecPath/ServerInstaller and may run on the UI thread.

  • FindUvPath/IsValidUvInstallation/FindWindowsUvPath replicate logic already exposed via ExecPath.ResolveUv()/ServerInstaller.FindUvPath.
  • FindUvPath is invoked during UI rendering (e.g., pre-checks), spawning processes (which/where) and IO scans; this can cause editor UI jank.

Recommendation:

  • Replace FindUvPath() calls with ExecPath.ResolveUv() at call sites.
  • Cache/memoize the result for the session to avoid repeated process spawn on repaint; optionally re-check on demand when user presses “Verify again”.

Example updates at call sites:

-                string uvPathEarly = FindUvPath();
+                string uvPathEarly = ExecPath.ResolveUv();
-                        string uvPath = FindUvPath();
+                        string uvPath = ExecPath.ResolveUv();
-                    string uvPathManual = FindUvPath();
+                    string uvPathManual = ExecPath.ResolveUv();

You can then remove the large FindUvPath helpers from this window and centralize on ExecPath/ServerInstaller.

Also applies to: 766-802, 884-907, 1154-1203, 1755-2033


1427-1449: Migrate validation-level pref to preserve users’ existing setting.

Switching to MCPForUnity_ScriptValidationLevel will reset existing users’ selection. Read from the new key first, but fall back to legacy keys once, then persist to the new key. Also, for one release, write to old keys when saving to keep external tooling in sync.

-            string savedLevel = EditorPrefs.GetString("MCPForUnity_ScriptValidationLevel", "standard");
+            string savedLevel = EditorPrefs.GetString("MCPForUnity_ScriptValidationLevel", null);
+            if (string.IsNullOrEmpty(savedLevel))
+            {
+                // Back-compat: migrate once from legacy keys if present
+                savedLevel = EditorPrefs.GetString("UnityMCP_ScriptValidationLevel", null)
+                              ?? EditorPrefs.GetString("UnityMCP.ScriptValidationLevel", "standard");
+                if (!string.IsNullOrEmpty(savedLevel))
+                {
+                    EditorPrefs.SetString("MCPForUnity_ScriptValidationLevel", savedLevel);
+                }
+            }
+            if (string.IsNullOrEmpty(savedLevel)) savedLevel = "standard";
-            EditorPrefs.SetString("MCPForUnity_ScriptValidationLevel", levelString);
+            EditorPrefs.SetString("MCPForUnity_ScriptValidationLevel", levelString);
+            // Optional: write legacy keys for one version to ease migration
+            EditorPrefs.SetString("UnityMCP_ScriptValidationLevel", levelString);
+            EditorPrefs.SetString("UnityMCP.ScriptValidationLevel", levelString);
-            string savedLevel = EditorPrefs.GetString("MCPForUnity_ScriptValidationLevel", "standard");
+            string savedLevel = EditorPrefs.GetString("MCPForUnity_ScriptValidationLevel", null)
+                             ?? EditorPrefs.GetString("UnityMCP_ScriptValidationLevel", null)
+                             ?? EditorPrefs.GetString("UnityMCP.ScriptValidationLevel", "standard");

Also applies to: 1465-1467


2035-2121: Remove or Document Unused FindClaudeCommand Helper

FindClaudeCommand isn’t referenced anywhere in the repository. To reduce dead code and maintenance surface:

• If you don’t plan to use it, delete the private FindClaudeCommand() method in
UnityMcpBridge/Editor/Windows/MCPForUnityEditorWindow.cs (lines 2035–2121).
• If it’s intended for future functionality, add a // TODO: … comment explaining its purpose and write a unit test covering its behavior.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 84a3ff4 and 02a9b4b.

📒 Files selected for processing (11)
  • CursorHelp.md (3 hunks)
  • UnityMcpBridge/Editor/Helpers/PortManager.cs (8 hunks)
  • UnityMcpBridge/Editor/Helpers/ServerInstaller.cs (4 hunks)
  • UnityMcpBridge/Editor/MCPForUnityBridge.cs (6 hunks)
  • UnityMcpBridge/Editor/MCPForUnityBridge.cs.meta (1 hunks)
  • UnityMcpBridge/Editor/Models/McpClient.cs (2 hunks)
  • UnityMcpBridge/Editor/Tools/ManageScript.cs (3 hunks)
  • UnityMcpBridge/Editor/Windows/MCPForUnityEditorWindow.cs (34 hunks)
  • UnityMcpBridge/Editor/Windows/MCPForUnityEditorWindow.cs.meta (1 hunks)
  • UnityMcpBridge/README.md (1 hunks)
  • UnityMcpBridge/UnityMcpServer~/src/port_discovery.py (3 hunks)
✅ Files skipped from review due to trivial changes (2)
  • UnityMcpBridge/Editor/Windows/MCPForUnityEditorWindow.cs.meta
  • UnityMcpBridge/Editor/MCPForUnityBridge.cs.meta
🚧 Files skipped from review as they are similar to previous changes (4)
  • UnityMcpBridge/Editor/Helpers/ServerInstaller.cs
  • UnityMcpBridge/Editor/Models/McpClient.cs
  • UnityMcpBridge/UnityMcpServer~/src/port_discovery.py
  • UnityMcpBridge/Editor/Tools/ManageScript.cs
🧰 Additional context used
🧬 Code Graph Analysis (3)
UnityMcpBridge/Editor/MCPForUnityBridge.cs (1)
UnityMcpBridge/Editor/Helpers/PortManager.cs (1)
  • IsDebugEnabled (19-23)
UnityMcpBridge/Editor/Windows/MCPForUnityEditorWindow.cs (3)
UnityMcpBridge/Editor/MCPForUnityBridge.cs (6)
  • MCPForUnityBridge (97-117)
  • IsAutoConnectMode (55-55)
  • GetCurrentPort (54-54)
  • StartAutoConnect (60-76)
  • Stop (328-353)
  • Start (223-326)
UnityMcpBridge/Editor/Helpers/ServerInstaller.cs (2)
  • ServerInstaller (10-448)
  • RepairPythonEnvironment (156-257)
UnityMcpBridge/Editor/Helpers/ExecPath.cs (2)
  • ExecPath (11-277)
  • ResolveClaude (16-89)
UnityMcpBridge/Editor/Helpers/PortManager.cs (1)
UnityMcpBridge/Editor/MCPForUnityBridge.cs (1)
  • IsDebugEnabled (40-43)
🪛 LanguageTool
CursorHelp.md

[grammar] ~7-~7: There might be a mistake here.
Context: ...Typical symptoms - Cursor shows the MCP for Unity server but never connects or repo...

(QB_NEW_EN)


[grammar] ~7-~7: There might be a mistake here.
Context: ...er connects or reports it “can’t start.” - Your %USERPROFILE%\\.cursor\\mcp.json ...

(QB_NEW_EN)


[grammar] ~75-~75: There might be a mistake here.
Context: ...ed override and will stop auto-rewrites. - If neither Links path exists, a reasonab...

(QB_NEW_EN)

UnityMcpBridge/README.md

[grammar] ~13-~13: There might be a mistake here.
Context: ...ck start 1. Open Window > MCP for Unity. 2. Click “Auto-Setup”. 3. If prompted: -...

(QB_NEW_EN)


[grammar] ~16-16: There might be a mistake here.
Context: ...tains server.py (UnityMcpServer
/src). - Install Python and/or uv if missing. ...

(QB_NEW_EN)


[grammar] ~30-~30: There might be a mistake here.
Context: ...ries; shown in UI), MCP 6500. - Actions: - Auto-Setup: Registers/updates your selec...

(QB_NEW_EN)


[grammar] ~39-~39: There might be a mistake here.
Context: ...all Instructions”. --- ## Unity Bridge - Shows Running or Stopped with a status d...

(QB_NEW_EN)


[grammar] ~41-~41: There might be a mistake here.
Context: ...ss used by MCP clients to talk to Unity. - Tip: After Auto-Setup, the bridge may au...

(QB_NEW_EN)


[grammar] ~48-~48: There might be a mistake here.
Context: ...urf, Claude Code). - Per-client actions: - Cursor / VS Code / Windsurf: - Auto Config...

(QB_NEW_EN)


[grammar] ~49-~49: There might be a mistake here.
Context: ...ctions: - Cursor / VS Code / Windsurf: - Auto Configure: Writes/updates your conf...

(QB_NEW_EN)


[grammar] ~51-~51: There might be a mistake here.
Context: ...h the server via uv: - Command: uv - Args: run --directory server...

(QB_NEW_EN)


[grammar] ~52-~52: There might be a mistake here.
Context: ...s: run --directory server.py - Manual Setup: Opens a window with a pre-...

(QB_NEW_EN)


[grammar] ~53-~53: There might be a mistake here.
Context: ...t to copy/paste into your client config. - Choose uv Install Location: If uv isn’...

(QB_NEW_EN)


[grammar] ~55-~55: There might be a mistake here.
Context: ...g file name once uv/server are detected. - Claude Code: - Register with Claude ...

(QB_NEW_EN)


[grammar] ~61-~61: There might be a mistake here.
Context: ...d Claude CLI path when detected. Notes: - The UI shows a status dot and a short st...

(QB_NEW_EN)


[grammar] ~62-~62: There might be a mistake here.
Context: ...d”, “uv Not Found”, “Claude Not Found”). - Use “Auto Configure” for one-click setup...

(QB_NEW_EN)


[grammar] ~67-~67: There might be a mistake here.
Context: .../copy config. --- ## Script Validation - Validation Level options: - Basic — On...

(QB_NEW_EN)


[grammar] ~69-~69: There might be a mistake here.
Context: ...n - Validation Level options: - Basic — Only syntax checks - Standard — Syntax + U...

(QB_NEW_EN)


[grammar] ~72-~72: There might be a mistake here.
Context: ...ll semantic validation (requires Roslyn) - Pick a level based on your project’s nee...

(QB_NEW_EN)


[grammar] ~77-~77: There might be a mistake here.
Context: ...r the dropdown. --- ## Troubleshooting - Python or uv not found: - Help: [Fix...

(QB_NEW_EN)


[grammar] ~78-~78: There might be a mistake here.
Context: ...ubleshooting - Python or uv not found: - Help: [Fix MCP for Unity with Cursor, VS...

(QB_NEW_EN)


[grammar] ~79-~79: There might be a mistake here.
Context: ...or Unity with Cursor, VS Code & Windsurf](https://github.com/CoplayDev/unity-mcp/wiki/1.-Fix-Unity-MCP-and-Cursor,-VSCode-&-Windsurf) - Claude CLI not found: - Help: [Fix MCP...

(QB_NEW_EN)


[grammar] ~80-~80: There might be a mistake here.
Context: ...Code-&-Windsurf) - Claude CLI not found: - Help: [Fix MCP for Unity with Claude Cod...

(QB_NEW_EN)


[grammar] ~85-~85: There might be a mistake here.
Context: ...Unity-MCP-and-Claude-Code) --- ## Tips - Enable “Show Debug Logs” in the header f...

(QB_NEW_EN)

🔇 Additional comments (27)
UnityMcpBridge/Editor/Helpers/PortManager.cs (7)

12-12: LGTM: Namespace updated consistently.

The namespace change from UnityMcpBridge.Editor.Helpers to MCPForUnity.Editor.Helpers aligns with the project-wide rebranding objectives.


15-15: LGTM: Documentation updated to reflect new branding.

The class summary correctly references "MCP for Unity" instead of the previous "Unity MCP Bridge".


21-21: LGTM: EditorPrefs key updated consistently.

The EditorPrefs key change from "UnityMCP.DebugLogs" to "MCPForUnity.DebugLogs" is consistent with the namespace change and matches the implementation in MCPForUnityBridge.cs.


51-51: LGTM: Log branding updated consistently.

All debug log messages have been updated to use the "MCP-FOR-UNITY" branding consistently throughout the port management flows. The color coding and formatting remain intact.

Also applies to: 60-60, 81-81, 94-94, 98-98, 105-105, 214-214


134-139: LGTM: Method signature and documentation updated.

The method name change from IsPortUsedByUnityMcp to IsPortUsedByMCPForUnity and the updated documentation correctly reflect the new branding while maintaining the same functionality.


143-149: LGTM: Method implementation comments updated.

The comments within the method implementation have been updated to reference "MCP for Unity" consistently with the rebranding effort.


176-176: LGTM: Method call updated to match renamed method.

The call to IsPortUsedByMCPForUnity correctly uses the new method name, maintaining functionality while aligning with the rebranding.

CursorHelp.md (4)

8-8: LGTM: symptom wording matches behavior post-rename.
Reference to “the MCP for Unity window” is consistent with the rebranding and the config key that remains unityMCP.


18-22: Confirm UI labels and menu path match the current Editor UI.
Post-rename, verify that:

  • The menu path is exactly “Window > MCP for Unity”.
  • The button label is exactly “Choose uv Install Location”.
  • The “Auto Configure” label still reads the same.

If any labels drift, users will struggle to follow the steps.


74-74: LGTM: guidance aligns with WinGet shim best practices.
Recommending the Links shim path is the right call for stability with GUI clients.


24-24: No stale UnityMCP.UvPath references found – rename is complete

All occurrences have been updated to MCPForUnity.UvPath in both docs and code:

  • CursorHelp.md (line 24)
  • UnityMcpBridge/Editor/Windows/MCPForUnityEditorWindow.cs (lines 795, 1123)
  • UnityMcpBridge/Editor/Helpers/ServerInstaller.cs (line 264)

No UnityMCP.UvPath remains. Approving these changes.

UnityMcpBridge/README.md (3)

1-8: Doc aligns with rename and editor entry point. LGTM.

Title, introduction, and menu path (“Window > MCP for Unity”) correctly reflect the rebrand and UI updates.


79-81: Troubleshooting wiki links verified

All linked wiki pages return HTTP 200 OK—no broken documentation links found.


29-29: Document default MCP port as 6500.

Confirmed that 6500 is the hardcoded default for mcp_port in both the server config (UnityMcpBridge/UnityMcpServer/src/config.py) and the Editor code. Please update the README accordingly:

• File: UnityMcpBridge/README.md (line 29)

-  - Ports: Unity (varies; shown in UI), MCP 6500.
+  - Ports: Unity (shown in UI), MCP: 6500 (default).
UnityMcpBridge/Editor/MCPForUnityBridge.cs (5)

13-21: Namespace/type rename looks consistent and scoped properly.

Usings, namespace, and the public class were cleanly migrated to MCPForUnity.*. No API surface changes beyond renaming. LGTM.


49-49: Branding/log strings updated to MCP-FOR-UNITY — LGTM.

All user-facing messages, including start/stop messages, were updated consistently. Error messages also reference MCPForUnityBridge correctly.

Also applies to: 230-231, 313-314, 346-351


97-117: Static ctor rename and init flow remain safe across reloads.

The initialization guards (delayCall + update safety net + reload hooks) remain intact after the rename. Looks good.


222-325: Port bind/retry strategy remains robust post-rename.

ReuseAddress + Linger(RST) and retry/fallback logic are preserved. AutoConnect resets the saved port via PortManager. Good.


42-42: No lingering UnityMCP.DebugLogs references detected. All EditorPrefs calls now consistently use "MCPForUnity.DebugLogs", and no occurrences of the old key remain in the repo.

UnityMcpBridge/Editor/Windows/MCPForUnityEditorWindow.cs (8)

14-21: Namespace/usings migration to MCPForUnity.Editor. is clean.*

The window type moved to MCPForUnity.Editor.Windows without changing public behavior. Looks good.


47-51: Menu path/title updated to “MCP for Unity”.

Window opens with the new branding; no behavioral change. LGTM.


231-235: Header label updated to “MCP for Unity Editor” — LGTM.

Branding is consistent with the PR objective.


275-287: Bridge mode/ports UI correctly reads from MCPForUnityBridge.

Reads use the new API and keys. Good alignment with the bridge class.


331-335: Install instructions link/button copy updated — LGTM.

Good UX to surface the Python install link when detection fails.


372-399: Manual bridge start/stop wiring updated — LGTM.

Toggle uses the new MCPForUnityBridge methods and reflects the real running state. No issues.

Also applies to: 937-945


1561-1576: Updated log copy is clear and matches branding.

Messages like auto-config rewrite and Claude unregister success use “MCP for Unity” and the MCP-FOR-UNITY tag. LGTM.

Also applies to: 1711-1719


58-61: No leftover UnityMCP EditorPrefs keys found — all preference keys have been renamed to MCPForUnity.*. The remaining UnityMcpBridge/UnityMcpServer tokens are directory, type, and documentation references, not EditorPrefs keys.

@dsarno
Copy link
Collaborator

dsarno commented Aug 20, 2025

@msanatan I took a very quick look -- it's seems like almost all search and replace of the new and old name, right? Seems fine to me and welcome to merge. When I pull those changes, if I see any difficult tangles, I'll let you know.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
UnityMcpBridge/Editor/Windows/MCPForUnityEditorWindow.cs (1)

1078-1085: Potential null reference when serverSrc cannot be resolved.

serverSrc can still be null after ResolveServerSrc(), leading to a NullReferenceException on serverSrc.IndexOf(...). Guard before using it.

Apply this diff:

-            // Hard-block PackageCache on Windows unless dev override is set
-            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
-                && serverSrc.IndexOf(@"\Library\PackageCache\", StringComparison.OrdinalIgnoreCase) >= 0
-                && !UnityEditor.EditorPrefs.GetBool("MCPForUnity.UseEmbeddedServer", false))
+            // Hard-block PackageCache on Windows unless dev override is set
+            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
             {
-                serverSrc = ServerInstaller.GetServerPath();
+                if (string.IsNullOrEmpty(serverSrc))
+                {
+                    return "Could not resolve MCP server path. Run 'Repair Python Env' or select the server folder.";
+                }
+                if (serverSrc.IndexOf(@"\Library\PackageCache\", StringComparison.OrdinalIgnoreCase) >= 0
+                    && !UnityEditor.EditorPrefs.GetBool("MCPForUnity.UseEmbeddedServer", false))
+                {
+                    serverSrc = ServerInstaller.GetServerPath();
+                    if (string.IsNullOrEmpty(serverSrc))
+                        return "Could not resolve installed server path. Please repair the Python environment.";
+                }
             }
🧹 Nitpick comments (8)
UnityMcpBridge/Editor/Windows/MCPForUnityEditorWindow.cs (8)

53-61: Migrate legacy EditorPrefs keys to preserve users’ settings post-rebrand.

Changing keys to the new MCPForUnity.* names will reset existing users’ toggles (e.g., Debug Logs, AutoRegisterEnabled). Migrate old keys once on enable if the new ones aren’t present.

Apply this diff to run a one-time migration before reading the new keys:

 private void OnEnable()
 {
   UpdatePythonServerInstallationStatus();

   // Refresh bridge status
-  isUnityBridgeRunning = MCPForUnityBridge.IsRunning;
-  autoRegisterEnabled = EditorPrefs.GetBool("MCPForUnity.AutoRegisterEnabled", true);
-  debugLogsEnabled = EditorPrefs.GetBool("MCPForUnity.DebugLogs", false);
+  MigrateLegacyEditorPrefs();
+  isUnityBridgeRunning = MCPForUnityBridge.IsRunning;
+  autoRegisterEnabled = EditorPrefs.GetBool("MCPForUnity.AutoRegisterEnabled", true);
+  debugLogsEnabled = EditorPrefs.GetBool("MCPForUnity.DebugLogs", false);

Add this helper (outside the selected range):

private static void MigrateLegacyEditorPrefs()
{
    try
    {
        // Only copy when the new key is missing but the old exists
        if (!EditorPrefs.HasKey("MCPForUnity.AutoRegisterEnabled"))
        {
            if (EditorPrefs.HasKey("UnityMCP.AutoRegisterEnabled"))
                EditorPrefs.SetBool("MCPForUnity.AutoRegisterEnabled", EditorPrefs.GetBool("UnityMCP.AutoRegisterEnabled"));
            else if (EditorPrefs.HasKey("UnityMcp.AutoRegisterEnabled"))
                EditorPrefs.SetBool("MCPForUnity.AutoRegisterEnabled", EditorPrefs.GetBool("UnityMcp.AutoRegisterEnabled"));
        }
        if (!EditorPrefs.HasKey("MCPForUnity.DebugLogs"))
        {
            if (EditorPrefs.HasKey("UnityMCP.DebugLogs"))
                EditorPrefs.SetBool("MCPForUnity.DebugLogs", EditorPrefs.GetBool("UnityMCP.DebugLogs"));
            else if (EditorPrefs.HasKey("UnityMcp.DebugLogs"))
                EditorPrefs.SetBool("MCPForUnity.DebugLogs", EditorPrefs.GetBool("UnityMcp.DebugLogs"));
        }
        if (!EditorPrefs.HasKey("MCPForUnity.PythonDirOverride") && EditorPrefs.HasKey("UnityMCP.PythonDirOverride"))
        {
            EditorPrefs.SetString("MCPForUnity.PythonDirOverride", EditorPrefs.GetString("UnityMCP.PythonDirOverride"));
        }
    }
    catch { /* best-effort */ }
}

Also applies to: 79-79, 245-245


344-351: Update folder-picker title to match rebrand and reduce confusion.

The panel title still says “UnityMcpServer/src”. Suggest a brand-neutral prompt.

Apply this diff:

-                        string picked = EditorUtility.OpenFolderPanel("Select UnityMcpServer/src", Application.dataPath, "");
+                        string picked = EditorUtility.OpenFolderPanel("Select MCP for Unity server folder (contains server.py)", Application.dataPath, "");

307-307: Unnecessary fully-qualified global:: usage; prefer consistency with other calls.

You already import MCPForUnity.Editor.Helpers at the top. Align with the rest of the file.

Apply this diff:

-                    bool ok = global::MCPForUnity.Editor.Helpers.ServerInstaller.RepairPythonEnvironment();
+                    bool ok = ServerInstaller.RepairPythonEnvironment();

1427-1429: Unify EditorPrefs key naming for validation level and add backward-compat fallback.

Keys elsewhere use dot-separated names. Recommend “MCPForUnity.ScriptValidationLevel” and fallback to the old underscore key to avoid losing user settings.

Apply this diff:

-            string savedLevel = EditorPrefs.GetString("MCPForUnity_ScriptValidationLevel", "standard");
+            string savedLevel = EditorPrefs.GetString("MCPForUnity.ScriptValidationLevel",
+                                                     EditorPrefs.GetString("MCPForUnity_ScriptValidationLevel", "standard"));
-            EditorPrefs.SetString("MCPForUnity_ScriptValidationLevel", levelString);
+            EditorPrefs.SetString("MCPForUnity.ScriptValidationLevel", levelString);
-            string savedLevel = EditorPrefs.GetString("MCPForUnity_ScriptValidationLevel", "standard");
+            string savedLevel = EditorPrefs.GetString("MCPForUnity.ScriptValidationLevel",
+                                                     EditorPrefs.GetString("MCPForUnity_ScriptValidationLevel", "standard"));

Also applies to: 1448-1449, 1465-1466


1546-1570: Make config path matching robust across OS and path variations.

Using string Contains on the entire args array is brittle. Prefer extracting the --directory argument and comparing normalized paths (you already have helpers).

Apply this diff:

-                    bool matches = pythonDir != null && Array.Exists(args, arg => arg.Contains(pythonDir, StringComparison.Ordinal));
+                    string configuredDir = ExtractDirectoryArg(args);
+                    bool matches = PathsEqual(configuredDir, pythonDir);

69-74: Auto-setup gate may skip non-Claude clients unnecessarily.

Current gating runs AutoFirstRunSetup only if the Claude CLI is present, which prevents first-run auto-setup for clients like VSCode/Cursor when Claude isn’t installed. If that’s not intentional, drop the gate and let client-specific checks decide.

Apply this diff if you want auto-setup for non-Claude clients:

-            // First-run auto-setup only if Claude CLI is available
-            if (autoRegisterEnabled && !string.IsNullOrEmpty(ExecPath.ResolveClaude()))
+            // First-run auto-setup; client-specific checks inside handle tool availability
+            if (autoRegisterEnabled)
             {
                 AutoFirstRunSetup();
             }

If the current behavior is intentional (per PR note: minimizing disruption), feel free to ignore.


1465-1466: Log prefix usage is mixed; consider centralizing for consistency.

Some logs are prefixed with MCP-FOR-UNITY while others aren’t. A small helper (e.g., Logger.Info/Warn/Error) would ensure consistent branding and future-proof changes.

I can draft a tiny static Logger class for Editor that wraps Debug.Log with the desired prefix if you want to adopt this pattern.

Also applies to: 1562-1562, 1576-1576, 1598-1599, 1627-1640, 1648-1649, 1691-1691, 1713-1713


1736-1748: Potentially unused methods: ParseTextOutput and FindClaudeCommand.

These appear unused in this file. If not referenced elsewhere, remove to reduce maintenance and confusion.

Would you like me to scan the repo for usages and raise a separate cleanup PR if truly unused?

Also applies to: 2035-2121

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 02a9b4b and 48f6299.

📒 Files selected for processing (1)
  • UnityMcpBridge/Editor/Windows/MCPForUnityEditorWindow.cs (40 hunks)
🔇 Additional comments (3)
UnityMcpBridge/Editor/Windows/MCPForUnityEditorWindow.cs (3)

14-21: Namespace and class rename looks consistent and scoped correctly.

Imports, namespace, and public class name align with the new MCPForUnity naming. No behavioral changes introduced here.


47-51: Editor menu path and window title updated to the new branding. LGTM.

The menu item and window title reflect “MCP for Unity” consistently.


2152-2160: “UnityMCP” in Claude Code configuration checks is intentional; LGTM.

The server identifier remains UnityMCP to preserve compatibility with existing configs as noted in the PR objectives.

Also applies to: 2176-2184

@msanatan
Copy link
Contributor Author

@msanatan I took a very quick look -- it's seems like almost all search and replace of the new and old name, right? Seems fine to me and welcome to merge. When I pull those changes, if I see any difficult tangles, I'll let you know.

Pretty much. I'm OK with missing some references. Searching and replacing felt a bit more deterministic than having an LLM do it!

I tested my current installation (found a bug for Windsurf), and new installation with VS Code. Works as good as before 😄

@msanatan
Copy link
Contributor Author

I'll merge this in, do a couple more outstanding fixes and make a new release!

@msanatan msanatan merged commit ae13ef4 into CoplayDev:main Aug 20, 2025
1 check passed
@msanatan msanatan deleted the feature/new-namespace branch August 20, 2025 19:59
dsarno added a commit to dsarno/unity-mcp that referenced this pull request Aug 25, 2025
…ing-testes

* fix/installer-cleanup-v2:
  Server: set server_version.txt to 3.0.1
  MCP: Fix macOS paths and VSCode manual setup
  refactor(installer): revert to lean installer logic from ee23346; fix macOS path via Application.platform; escape pgrep pattern
  feat(installer): rewire known configs (EditorPrefs, Cursor mcp.json) to canonical path; then remove legacy if unreferenced
  chore(version): bump server_version.txt to 3.0.5
  fix(installer): use Application.platform for OS detection; add canonical root logs; fallback to RuntimeInformation
  chore(logging): include OS and server version in MCP bridge start log
  chore(server): bump server_version.txt to 3.0.4
  bump server version
  sec(installer): escape server path in pgrep pattern to prevent injection/regex issues
  chore(editor): WriteToConfig honors pythonDir; robust config match; remove unused helpers
  fix(installer): skip legacy deletion when still referenced in prefs or Cursor config
  Improve Windsurf MCP Config (CoplayDev#231)
  feat: installer cleanup, auto-migration, logging normalization
  chore: bump version to 3.0.0
  Don't ignore the package's README (CoplayDev#230)
  Rename namespace and public facing plugin output from "Unity MCP" to "MCP for Unity" (CoplayDev#225)

# Conflicts:
#	UnityMcpBridge/Editor/Tools/ManageScript.cs
#	UnityMcpBridge/Editor/Windows/MCPForUnityEditorWindow.cs
#	UnityMcpBridge/UnityMcpServer~/src/server.py
#	UnityMcpBridge/UnityMcpServer~/src/tools/__init__.py
#	UnityMcpBridge/UnityMcpServer~/src/uv.lock
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.

2 participants