diff --git a/MCPForUnity/Editor/Clients/Configurators/OpenCodeConfigurator.cs.meta b/MCPForUnity/Editor/Clients/Configurators/OpenCodeConfigurator.cs.meta index 8094fb1d0..c3b334d51 100644 --- a/MCPForUnity/Editor/Clients/Configurators/OpenCodeConfigurator.cs.meta +++ b/MCPForUnity/Editor/Clients/Configurators/OpenCodeConfigurator.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: 489f99ffb7e6743e88e3203552c8b37b \ No newline at end of file +guid: 489f99ffb7e6743e88e3203552c8b37b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/MCPForUnity/Editor/Constants/EditorPrefKeys.cs b/MCPForUnity/Editor/Constants/EditorPrefKeys.cs index a6e81b4ac..42bfac2dd 100644 --- a/MCPForUnity/Editor/Constants/EditorPrefKeys.cs +++ b/MCPForUnity/Editor/Constants/EditorPrefKeys.cs @@ -28,6 +28,7 @@ internal static class EditorPrefKeys internal const string WebSocketUrlOverride = "MCPForUnity.WebSocketUrl"; internal const string GitUrlOverride = "MCPForUnity.GitUrlOverride"; internal const string DevModeForceServerRefresh = "MCPForUnity.DevModeForceServerRefresh"; + internal const string UseTestPyPI = "MCPForUnity.UseTestPyPI"; internal const string ProjectScopedToolsLocalHttp = "MCPForUnity.ProjectScopedTools.LocalHttp"; internal const string PackageDeploySourcePath = "MCPForUnity.PackageDeploy.SourcePath"; diff --git a/MCPForUnity/Editor/Helpers/ConfigJsonBuilder.cs b/MCPForUnity/Editor/Helpers/ConfigJsonBuilder.cs index dd00d73d0..489e9a070 100644 --- a/MCPForUnity/Editor/Helpers/ConfigJsonBuilder.cs +++ b/MCPForUnity/Editor/Helpers/ConfigJsonBuilder.cs @@ -2,8 +2,8 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using MCPForUnity.Editor.Constants; using MCPForUnity.Editor.Clients.Configurators; +using MCPForUnity.Editor.Constants; using MCPForUnity.Editor.Helpers; using MCPForUnity.Editor.Models; using Newtonsoft.Json; @@ -170,7 +170,19 @@ private static IList BuildUvxArgs(string fromUrl, string packageName) args.Add("--no-cache"); args.Add("--refresh"); } - if (!string.IsNullOrEmpty(fromUrl)) + + // TestPyPI mode: use test.pypi.org as the default index for pre-release testing + // When using TestPyPI, don't pin version since TestPyPI versions may differ from PyPI + bool useTestPyPI = EditorPrefs.GetBool(EditorPrefKeys.UseTestPyPI, false); + if (useTestPyPI) + { + args.Add("--default-index"); + args.Add("https://test.pypi.org/simple/"); + // Use unversioned package name to get latest from TestPyPI + args.Add("--from"); + args.Add("mcpforunityserver"); + } + else if (!string.IsNullOrEmpty(fromUrl)) { args.Add("--from"); args.Add(fromUrl); diff --git a/MCPForUnity/Editor/Windows/Components/Advanced/McpAdvancedSection.cs b/MCPForUnity/Editor/Windows/Components/Advanced/McpAdvancedSection.cs index 26f610167..cc5d1defb 100644 --- a/MCPForUnity/Editor/Windows/Components/Advanced/McpAdvancedSection.cs +++ b/MCPForUnity/Editor/Windows/Components/Advanced/McpAdvancedSection.cs @@ -26,6 +26,7 @@ public class McpAdvancedSection private Button clearGitUrlButton; private Toggle debugLogsToggle; private Toggle devModeForceRefreshToggle; + private Toggle useTestPyPIToggle; private TextField deploySourcePath; private Button browseDeploySourceButton; private Button clearDeploySourceButton; @@ -64,6 +65,7 @@ private void CacheUIElements() clearGitUrlButton = Root.Q