{"record":{"id":"d0a011679ef158e4","repo":"CoplayDev/unity-mcp","slug":"uvx-not-found-install-uv-uvx-or-set-the-override-d0a011","errorCode":null,"errorMessage":"uvx not found. Install uv/uvx or set the override in Advanced Settings.","messagePattern":"uvx not found\\. Install uv/uvx or set the override in Advanced Settings\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs","lineNumber":61,"sourceCode":"        public virtual string GetSkillInstallPath() => null;\n\n        public abstract string GetConfigPath();\n        public abstract McpStatus CheckStatus(bool attemptAutoRewrite = true);\n        public abstract void Configure();\n\n        /// <summary>Default Unregister is a no-op. Override in JsonFileMcpConfigurator /\n        /// ClaudeCliMcpConfigurator etc. where removal has a concrete implementation.</summary>\n        public virtual void Unregister() { }\n\n        public abstract string GetManualSnippet();\n        public abstract IList<string> GetInstallationSteps();\n\n        protected string GetUvxPathOrError()\n        {\n            string uvx = MCPServiceLocator.Paths.GetUvxPath();\n            if (string.IsNullOrEmpty(uvx))\n            {\n                throw new InvalidOperationException(\"uvx not found. Install uv/uvx or set the override in Advanced Settings.\");\n            }\n            return uvx;\n        }\n\n        protected string CurrentOsPath()\n        {\n            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))\n                return client.windowsConfigPath;\n            if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))\n                return client.macConfigPath;\n            return client.linuxConfigPath;\n        }\n\n        protected static bool ParentDirectoryExists(string configPath)\n        {\n            try\n            {\n                if (string.IsNullOrEmpty(configPath)) return false;","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/CoplayDev/unity-mcp/blob/c21bf496bca87d54e75bad048563c3adb1782081/MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs#L43-L79","documentation":"GetUvxPathOrError() is a protected helper on McpClientConfiguratorBase used by JsonFileMcpConfigurator.GetManualSnippet() and other base-class methods. It calls MCPServiceLocator.Paths.GetUvxPath() and throws InvalidOperationException if the result is null or empty. GetUvxPath() returns null only when an explicit override is invalid and no system fallback exists; without an override it always returns at least the bare string 'uvx'.","triggerScenarios":"Any base-class code path that calls GetUvxPathOrError() — typically GetManualSnippet() on a JsonFileMcpConfigurator subclass — when GetUvxPath() returns null (invalid override, no system binary).","commonSituations":"The user clicks 'Copy Manual Snippet' or similar in the MCP for Unity UI while a stale uvx override is set. A CI environment where EditorPrefs carries a bad override from a prior run.","solutions":["Remove or correct the uvx path override in Advanced Settings.","Install uv/uvx system-wide so GetUvxPath() discovers it via ResolveUvxFromSystem().","If the override is the issue, clear it via EditorPrefs.DeleteKey(EditorPrefKeys.UvxPathOverride) or the Advanced Settings UI."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"string uvx = MCPServiceLocator.Paths.GetUvxPath();\nif (string.IsNullOrEmpty(uvx))\n{ ShowErrorAndGuideUser(\"uvx not found. Install uv or set override in Advanced Settings.\"); return; }","typeGuard":null,"tryCatchPattern":"try { string snippet = configurator.GetManualSnippet(); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"uvx not found\"))\n{ snippet = \"# Install uv/uvx first, then retry.\"; }","preventionTips":["Ensure uv is installed before generating manual snippets.","Validate the uvx path override after moving or renaming the binary.","Use the Advanced Settings diagnostic to verify uvx detection."],"tags":["configuration","uvx","dependency","base-class","shared"],"backgroundTag":null,"analyzedSha":"c21bf496bca87d54e75bad048563c3adb1782081","analyzedAt":"2026-08-13T17:36:56.095Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}