-
Notifications
You must be signed in to change notification settings - Fork 192
Open
Description
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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels