Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6856ac7
Remove temp folder from repo
msanatan Oct 31, 2025
37eba8c
Ignore boot.config
msanatan Oct 31, 2025
64d64fd
Remove buttons to download or rebuild the server
msanatan Oct 31, 2025
c830d56
Remove embedded MCP server in plugin
msanatan Oct 31, 2025
85e9342
As much as possible, rip out logic that installs a server
msanatan Nov 3, 2025
d217e28
feat: migrate to uvx-based server configuration
msanatan Nov 3, 2025
1314536
Cleanup the temp folders created by tests
msanatan Nov 3, 2025
6f4badb
The test kept failing but the results looked correct, floating point …
msanatan Nov 3, 2025
fbee90b
Merge branch 'main' into use-uvx
msanatan Nov 3, 2025
50902b9
feat: migrate from local server to uvx-based configuration
msanatan Nov 3, 2025
08b3d18
refactor: use dynamic package version instead of hardcoded value
msanatan Nov 4, 2025
014f8c7
Update CI so it only updates the Server folder
msanatan Nov 4, 2025
cad8c20
feat: implement uvx package source path resolution
msanatan Nov 4, 2025
fa54c5f
Merge branch 'main' into use-uvx
msanatan Nov 5, 2025
b4be068
refactor: replace Python tool syncing with custom tool registration s…
msanatan Nov 10, 2025
d38e246
feat: add HTTP transport support and cache management
msanatan Nov 10, 2025
f8e053e
refactor: simplify HTTP configuration to use URL-based approach
msanatan Nov 10, 2025
a16c9ec
refactor: standardize transport configuration with explicit --transpo…
msanatan Nov 10, 2025
793f996
refactor: move MCP menu items under Window menu
msanatan Nov 10, 2025
fdb9859
feat: restructure config generation for HTTP transport mode
msanatan Nov 10, 2025
a7e0bd2
Fix: Use force_refresh=True in unity_instances resource for cache con…
dsarno Nov 11, 2025
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
10 changes: 5 additions & 5 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ jobs:
jq ".version = \"${NEW_VERSION}\"" MCPForUnity/package.json > MCPForUnity/package.json.tmp
mv MCPForUnity/package.json.tmp MCPForUnity/package.json

echo "Updating MCPForUnity/UnityMcpServer~/src/pyproject.toml to $NEW_VERSION"
sed -i '0,/^version = ".*"/s//version = "'"$NEW_VERSION"'"/' "MCPForUnity/UnityMcpServer~/src/pyproject.toml"
echo "Updating Server/pyproject.toml to $NEW_VERSION"
sed -i '0,/^version = ".*"/s//version = "'"$NEW_VERSION"'"/' "Server/pyproject.toml"

echo "Updating MCPForUnity/UnityMcpServer~/src/server_version.txt to $NEW_VERSION"
echo "$NEW_VERSION" > "MCPForUnity/UnityMcpServer~/src/server_version.txt"
echo "Updating Server/server_version.txt to $NEW_VERSION"
echo "$NEW_VERSION" > "Server/server_version.txt"

- name: Commit and push changes
env:
Expand All @@ -81,7 +81,7 @@ jobs:
set -euo pipefail
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add MCPForUnity/package.json "MCPForUnity/UnityMcpServer~/src/pyproject.toml" "MCPForUnity/UnityMcpServer~/src/server_version.txt"
git add MCPForUnity/package.json "Server/pyproject.toml" "Server/server_version.txt"
if git diff --cached --quiet; then
echo "No version changes to commit."
else
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ build/
dist/
wheels/
*.egg-info
UnityMcpServer/**/*.meta
UnityMcpServer.meta

# Virtual environments
.venv
Expand Down
107 changes: 0 additions & 107 deletions MCPForUnity/Editor/Data/PythonToolsAsset.cs

This file was deleted.

4 changes: 0 additions & 4 deletions MCPForUnity/Editor/Dependencies/DependencyManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ public static DependencyCheckResult CheckAllDependencies()
var uvStatus = detector.DetectUV();
result.Dependencies.Add(uvStatus);

// Check MCP Server
var serverStatus = detector.DetectMCPServer();
result.Dependencies.Add(serverStatus);

// Generate summary and recommendations
result.GenerateSummary();
GenerateRecommendations(result, detector);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ public interface IPlatformDetector
/// </summary>
DependencyStatus DetectUV();

/// <summary>
/// Detect MCP server installation on this platform
/// </summary>
DependencyStatus DetectMCPServer();

/// <summary>
/// Get platform-specific installation recommendations
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.IO;
using MCPForUnity.Editor.Dependencies.Models;
using MCPForUnity.Editor.Helpers;
using MCPForUnity.Editor.Services;

namespace MCPForUnity.Editor.Dependencies.PlatformDetectors
{
Expand All @@ -29,15 +30,15 @@ public virtual DependencyStatus DetectUV()
try
{
// Use existing UV detection from ServerInstaller
string uvPath = ServerInstaller.FindUvPath();
if (!string.IsNullOrEmpty(uvPath))
string uvxPath = MCPServiceLocator.Paths.GetUvxPath(verifyPath: false);
if (!string.IsNullOrEmpty(uvxPath))
{
if (TryValidateUV(uvPath, out string version))
if (TryValidateUvx(uvxPath, out string version))
{
status.IsAvailable = true;
status.Version = version;
status.Path = uvPath;
status.Details = $"Found UV {version} at {uvPath}";
status.Path = uvxPath;
status.Details = $"Found UV {version} at {uvxPath}";
return status;
}
}
Expand All @@ -53,63 +54,15 @@ public virtual DependencyStatus DetectUV()
return status;
}

public virtual DependencyStatus DetectMCPServer()
{
var status = new DependencyStatus("MCP Server", isRequired: false);

try
{
// Check if server is installed
string serverPath = ServerInstaller.GetServerPath();
string serverPy = Path.Combine(serverPath, "server.py");

if (File.Exists(serverPy))
{
status.IsAvailable = true;
status.Path = serverPath;

// Try to get version
string versionFile = Path.Combine(serverPath, "server_version.txt");
if (File.Exists(versionFile))
{
status.Version = File.ReadAllText(versionFile).Trim();
}

status.Details = $"MCP Server found at {serverPath}";
}
else
{
// Check for embedded server
if (ServerPathResolver.TryFindEmbeddedServerSource(out string embeddedPath))
{
status.IsAvailable = true;
status.Path = embeddedPath;
status.Details = "MCP Server available (embedded in package)";
}
else
{
status.ErrorMessage = "MCP Server not found";
status.Details = "Server will be installed automatically when needed";
}
}
}
catch (Exception ex)
{
status.ErrorMessage = $"Error detecting MCP Server: {ex.Message}";
}

return status;
}

protected bool TryValidateUV(string uvPath, out string version)
protected bool TryValidateUvx(string uvxPath, out string version)
{
version = null;

try
{
var psi = new ProcessStartInfo
{
FileName = uvPath,
FileName = uvxPath,
Arguments = "--version",
UseShellExecute = false,
RedirectStandardOutput = true,
Expand Down
46 changes: 45 additions & 1 deletion MCPForUnity/Editor/Helpers/AssetPathUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using UnityEditor;
using UnityEngine;
using PackageInfo = UnityEditor.PackageManager.PackageInfo;
using MCPForUnity.Editor.Services;

namespace MCPForUnity.Editor.Helpers
{
Expand Down Expand Up @@ -136,7 +137,50 @@ public static JObject GetPackageJson()
}

/// <summary>
/// Gets the version string from the package.json file.
/// Gets the uvx command with the correct package version for running the MCP server
/// </summary>
/// <returns>Uvx command string, or "uvx" if version is unknown</returns>
public static string GetUvxCommand()
{
string version = GetPackageVersion();
if (version == "unknown")
{
return "uvx";
}

return $"uvx --from git+https://github.com/CoplayDev/unity-mcp@v{version}#subdirectory=Server";
}

/// <summary>
/// Gets just the git URL part for the MCP server package
/// </summary>
/// <returns>Git URL string, or empty string if version is unknown</returns>
public static string GetMcpServerGitUrl()
{
string version = GetPackageVersion();
if (version == "unknown")
{
return "";
}

return $"git+https://github.com/CoplayDev/unity-mcp@v{version}#subdirectory=Server";
}

/// <summary>
/// Gets structured uvx command parts for different client configurations
/// </summary>
/// <returns>Tuple containing (uvxPath, fromUrl, packageName)</returns>
public static (string uvxPath, string fromUrl, string packageName) GetUvxCommandParts()
{
string uvxPath = MCPServiceLocator.Paths.GetUvxPath() ?? "uvx";
string fromUrl = GetMcpServerGitUrl();
string packageName = "mcp-for-unity";

return (uvxPath, fromUrl, packageName);
}

/// <summary>
/// Gets the package version from package.json
/// </summary>
/// <returns>Version string, or "unknown" if not found</returns>
public static string GetPackageVersion()
Expand Down
Loading
Loading