Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion MCPForUnity/Editor/Dependencies/DependencyManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private static void GenerateRecommendations(DependencyCheckResult result, IPlatf
{
if (dep.Name == "Python")
{
result.RecommendedActions.Add($"Install Python 3.11+ from: {detector.GetPythonInstallUrl()}");
result.RecommendedActions.Add($"Install Python 3.10+ from: {detector.GetPythonInstallUrl()}");
}
else if (dep.Name == "UV Package Manager")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public override DependencyStatus DetectPython()
}
}

status.ErrorMessage = "Python not found. Please install Python 3.11 or later.";
status.ErrorMessage = "Python not found. Please install Python 3.10 or later.";
status.Details = "Checked common installation paths including system, snap, and user-local locations.";
}
catch (Exception ex)
Expand Down Expand Up @@ -144,10 +144,10 @@ private bool TryValidatePython(string pythonPath, out string version, out string
version = output.Substring(7); // Remove "Python " prefix
fullPath = pythonPath;

// Validate minimum version (Python 4+ or Python 3.11+)
// Validate minimum version (Python 4+ or Python 3.10+)
if (TryParseVersion(version, out var major, out var minor))
{
return major > 3 || (major >= 3 && minor >= 11);
return major > 3 || (major >= 3 && minor >= 10);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ public override DependencyStatus DetectPython()
"/usr/bin/python3",
"/usr/local/bin/python3",
"/opt/homebrew/bin/python3",
"/Library/Frameworks/Python.framework/Versions/3.14/bin/python3",
"/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"/Library/Frameworks/Python.framework/Versions/3.12/bin/python3",
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3"
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3",
"/Library/Frameworks/Python.framework/Versions/3.10/bin/python3"
};

foreach (var candidate in candidates)
Expand Down Expand Up @@ -64,7 +66,7 @@ public override DependencyStatus DetectPython()
}
}

status.ErrorMessage = "Python not found. Please install Python 3.11 or later.";
status.ErrorMessage = "Python not found. Please install Python 3.10 or later.";
status.Details = "Checked common installation paths including Homebrew, Framework, and system locations.";
}
catch (Exception ex)
Expand Down Expand Up @@ -143,10 +145,10 @@ private bool TryValidatePython(string pythonPath, out string version, out string
version = output.Substring(7); // Remove "Python " prefix
fullPath = pythonPath;

// Validate minimum version (Python 4+ or Python 3.11+)
// Validate minimum version (Python 4+ or Python 3.10+)
if (TryParseVersion(version, out var major, out var minor))
{
return major > 3 || (major >= 3 && minor >= 11);
return major > 3 || (major >= 3 && minor >= 10);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,26 @@ public override DependencyStatus DetectPython()
{
"python.exe",
"python3.exe",
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"Programs", "Python", "Python314", "python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"Programs", "Python", "Python313", "python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"Programs", "Python", "Python312", "python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"Programs", "Python", "Python311", "python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"Programs", "Python", "Python310", "python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
"Python314", "python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
"Python313", "python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
"Python312", "python.exe")
"Python312", "python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
"Python311", "python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
"Python310", "python.exe")
};

foreach (var candidate in candidates)
Expand Down Expand Up @@ -68,7 +78,7 @@ public override DependencyStatus DetectPython()
}
}

status.ErrorMessage = "Python not found. Please install Python 3.11 or later.";
status.ErrorMessage = "Python not found. Please install Python 3.10 or later.";
status.Details = "Checked common installation paths and PATH environment variable.";
}
catch (Exception ex)
Expand All @@ -94,7 +104,7 @@ public override string GetInstallationRecommendations()
return @"Windows Installation Recommendations:

1. Python: Install from Microsoft Store or python.org
- Microsoft Store: Search for 'Python 3.12' or 'Python 3.13'
- Microsoft Store: Search for 'Python 3.10' or higher
- Direct download: https://python.org/downloads/windows/

2. UV Package Manager: Install via PowerShell
Expand Down Expand Up @@ -132,10 +142,10 @@ private bool TryValidatePython(string pythonPath, out string version, out string
version = output.Substring(7); // Remove "Python " prefix
fullPath = pythonPath;

// Validate minimum version (Python 4+ or Python 3.11+)
// Validate minimum version (Python 4+ or Python 3.10+)
if (TryParseVersion(version, out var major, out var minor))
{
return major > 3 || (major >= 3 && minor >= 11);
return major > 3 || (major >= 3 && minor >= 10);
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions MCPForUnity/Editor/Helpers/ServerInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -733,10 +733,12 @@ internal static string FindUvPath()
Path.Combine(programFiles, "WinGet", "Links", "uv.exe"),

// Common per-user installs
Path.Combine(localAppData, @"Programs\Python\Python314\Scripts\uv.exe"),
Path.Combine(localAppData, @"Programs\Python\Python313\Scripts\uv.exe"),
Path.Combine(localAppData, @"Programs\Python\Python312\Scripts\uv.exe"),
Path.Combine(localAppData, @"Programs\Python\Python311\Scripts\uv.exe"),
Path.Combine(localAppData, @"Programs\Python\Python310\Scripts\uv.exe"),
Path.Combine(appData, @"Python\Python314\Scripts\uv.exe"),
Path.Combine(appData, @"Python\Python313\Scripts\uv.exe"),
Path.Combine(appData, @"Python\Python312\Scripts\uv.exe"),
Path.Combine(appData, @"Python\Python311\Scripts\uv.exe"),
Expand All @@ -761,8 +763,11 @@ internal static string FindUvPath()
Path.Combine(home, ".local", "bin", "uv"),
"/opt/homebrew/opt/uv/bin/uv",
// Framework Python installs
"/Library/Frameworks/Python.framework/Versions/3.14/bin/uv",
"/Library/Frameworks/Python.framework/Versions/3.13/bin/uv",
"/Library/Frameworks/Python.framework/Versions/3.12/bin/uv",
"/Library/Frameworks/Python.framework/Versions/3.11/bin/uv",
"/Library/Frameworks/Python.framework/Versions/3.10/bin/uv",
// Fallback to PATH resolution by name
"uv"
};
Expand Down
9 changes: 6 additions & 3 deletions MCPForUnity/Editor/Services/PathResolverService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,21 @@ public bool IsPythonDetected()
// Common Windows Python installation paths
string[] windowsCandidates =
{
@"C:\Python314\python.exe",
@"C:\Python313\python.exe",
@"C:\Python312\python.exe",
@"C:\Python311\python.exe",
@"C:\Python310\python.exe",
@"C:\Python39\python.exe",
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python314\python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python313\python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python312\python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python311\python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python310\python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python39\python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python314\python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python313\python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python312\python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python311\python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python310\python.exe"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python39\python.exe"),
};

foreach (string c in windowsCandidates)
Expand Down Expand Up @@ -134,8 +134,11 @@ public bool IsPythonDetected()
"/usr/bin/python3",
"/opt/local/bin/python3",
Path.Combine(home, ".local", "bin", "python3"),
"/Library/Frameworks/Python.framework/Versions/3.14/bin/python3",
"/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
"/Library/Frameworks/Python.framework/Versions/3.12/bin/python3",
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3",
"/Library/Frameworks/Python.framework/Versions/3.10/bin/python3",
};
foreach (string c in candidates)
{
Expand Down
2 changes: 1 addition & 1 deletion MCPForUnity/Editor/Setup/SetupWizardWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private void DrawSetupStep()
{
// Only show critical warnings when dependencies are actually missing
EditorGUILayout.HelpBox(
"\u26A0 Missing Dependencies: MCP for Unity requires Python 3.11+ and UV package manager to function properly.",
"\u26A0 Missing Dependencies: MCP for Unity requires Python 3.10+ and UV package manager to function properly.",
MessageType.Warning
);

Expand Down
2 changes: 1 addition & 1 deletion MCPForUnity/UnityMcpServer~/src/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "MCPForUnityServer"
version = "6.3.0"
description = "MCP for Unity Server: A Unity package for Unity Editor integration via the Model Context Protocol (MCP)."
readme = "README.md"
requires-python = ">=3.11"
requires-python = ">=3.10"
dependencies = [
"httpx>=0.27.2",
"fastmcp>=2.12.5",
Expand Down
Loading