Bug
The Configure button for Claude Code in Tools > MCP Unity > Server Window throws an error on Linux:
Unsupported platform for Claude configuration path resolution
UnityEngine.Debug:LogError (object)
McpUnity.Utils.McpUtils:GetClaudeCodeConfigPath () (at ./Packages/com.gamelovers.mcp-unity/Editor/Utils/McpUtils.cs:405)
McpUnity.Utils.McpUtils:AddToClaudeCodeConfig (bool) (at ./Packages/com.gamelovers.mcp-unity/Editor/Utils/McpUtils.cs:211)
Root Cause
GetClaudeCodeConfigPath() in McpUtils.cs around line 388 only handles WindowsEditor and OSXEditor, falling through to an error for LinuxEditor:
if (Application.platform == RuntimePlatform.WindowsEditor)
{
homeDir = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
}
else if (Application.platform == RuntimePlatform.OSXEditor)
{
homeDir = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
}
else
{
Debug.LogError("Unsupported platform for Claude configuration path resolution");
return null;
}
Fix
Add LinuxEditor alongside OSXEditor — both use $HOME/.claude.json:
else if (Application.platform == RuntimePlatform.OSXEditor
|| Application.platform == RuntimePlatform.LinuxEditor)
{
homeDir = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
}
The same fix likely applies to other config path methods in McpUtils.cs that have an identical Windows/macOS pattern (e.g. GetAntigravityConfigPath, GetWindsurfConfigPath, etc.).
Environment
- OS: Linux (Ubuntu, Unity Editor
LinuxEditor)
- mcp-unity: v1.2.0
- Unity: 6 (6000.x)
Bug
The Configure button for Claude Code in
Tools > MCP Unity > Server Windowthrows an error on Linux:Root Cause
GetClaudeCodeConfigPath()inMcpUtils.csaround line 388 only handlesWindowsEditorandOSXEditor, falling through to an error forLinuxEditor:Fix
Add
LinuxEditoralongsideOSXEditor— both use$HOME/.claude.json:The same fix likely applies to other config path methods in
McpUtils.csthat have an identical Windows/macOS pattern (e.g.GetAntigravityConfigPath,GetWindsurfConfigPath, etc.).Environment
LinuxEditor)