Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions MCPForUnity/Editor/Clients/Configurators/ClaudeCodeConfigurator.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
using System;
using System.Collections.Generic;
using System.IO;
using MCPForUnity.Editor.Models;

namespace MCPForUnity.Editor.Clients.Configurators
{
public class ClaudeCodeConfigurator : ClaudeCliMcpConfigurator
public class ClaudeCodeConfigurator : JsonFileMcpConfigurator
{
public ClaudeCodeConfigurator() : base(new McpClient
{
name = "Claude Code",
windowsConfigPath = string.Empty,
macConfigPath = string.Empty,
linuxConfigPath = string.Empty,
windowsConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".claude.json"),
macConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".claude.json"),
linuxConfigPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".claude.json"),
SupportsHttpTransport = true,
HttpUrlProperty = "url", // Claude Code uses "url" for HTTP servers
IsVsCodeLayout = false, // Claude Code uses standard mcpServers layout
})
{ }

public override IList<string> GetInstallationSteps() => new List<string>
{
"Ensure Claude CLI is installed",
"Use the Register button to register automatically\nOR manually run: claude mcp add UnityMCP",
"Restart Claude Code"
"Open your project in Claude Code",
"Click Configure in MCP for Unity (or manually edit ~/.claude.json)",
"The MCP server will be added to the global mcpServers section",
"Restart Claude Code to apply changes"
};
Comment on lines 22 to 28
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Installation steps: clarify whether “Configure” happens in Unity vs Claude Code (ordering reads ambiguous).
As written, “Open your project in Claude Code” followed by “Click Configure in MCP for Unity” could confuse users about where that button exists. Consider making Unity vs Claude Code explicit.

Proposed diff
 public override IList<string> GetInstallationSteps() => new List<string>
 {
-    "Open your project in Claude Code",
-    "Click Configure in MCP for Unity (or manually edit ~/.claude.json)",
+    "In Unity: open MCP for Unity and click Configure (or manually edit ~/.claude.json)",
+    "In Claude Code: open your project",
     "The MCP server will be added to the global mcpServers section",
     "Restart Claude Code to apply changes"
 };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public override IList<string> GetInstallationSteps() => new List<string>
{
"Ensure Claude CLI is installed",
"Use the Register button to register automatically\nOR manually run: claude mcp add UnityMCP",
"Restart Claude Code"
"Open your project in Claude Code",
"Click Configure in MCP for Unity (or manually edit ~/.claude.json)",
"The MCP server will be added to the global mcpServers section",
"Restart Claude Code to apply changes"
};
public override IList<string> GetInstallationSteps() => new List<string>
{
"In Unity: open MCP for Unity and click Configure (or manually edit ~/.claude.json)",
"In Claude Code: open your project",
"The MCP server will be added to the global mcpServers section",
"Restart Claude Code to apply changes"
};
🤖 Prompt for AI Agents
In @MCPForUnity/Editor/Clients/Configurators/ClaudeCodeConfigurator.cs around
lines 22 - 28, The installation steps in
ClaudeCodeConfigurator.GetInstallationSteps are ambiguous about which UI hosts
the "Configure" action; update the step strings to explicitly name the
application for each action (e.g., "Open your project in Claude Code", then "In
Unity (MCP for Unity) click 'Configure' or edit ~/.claude.json" or split into
"In Claude Code: open your project" and "In Unity (MCP for Unity): click
'Configure'"), preserving the same list order and return type in
ClaudeCodeConfigurator so users clearly know which app to interact with for each
step.

}
}