diff --git a/Editor/Utils/McpUtils.cs b/Editor/Utils/McpUtils.cs index 5641b3f..8313ebf 100644 --- a/Editor/Utils/McpUtils.cs +++ b/Editor/Utils/McpUtils.cs @@ -353,6 +353,11 @@ public static void RunNpmCommand(string arguments, string workingDirectory) // Fallback to /bin/bash to find 'npm' in PATH startInfo.FileName = "/bin/bash"; startInfo.Arguments = $"-c \"npm {arguments}\""; + + // Ensure PATH includes common npm locations and current PATH + string currentPath = Environment.GetEnvironmentVariable("PATH") ?? string.Empty; + string extraPaths = "/usr/local/bin:/opt/homebrew/bin"; + startInfo.EnvironmentVariables["PATH"] = $"{extraPaths}:{currentPath}"; } try