@@ -741,7 +741,7 @@ public override void Configure()
741741 public void ConfigureWithCapturedValues (
742742 string projectDir , string claudePath , string pathPrepend ,
743743 bool useHttpTransport , string httpUrl ,
744- string uvxPath , string fromArgs , string packageName , bool shouldForceRefresh ,
744+ string uvxPath , string fromArgs , string packageName , string uvxDevFlags ,
745745 string apiKey ,
746746 Models . ConfiguredTransport serverTransport )
747747 {
@@ -752,7 +752,7 @@ public void ConfigureWithCapturedValues(
752752 else
753753 {
754754 RegisterWithCapturedValues ( projectDir , claudePath , pathPrepend ,
755- useHttpTransport , httpUrl , uvxPath , fromArgs , packageName , shouldForceRefresh ,
755+ useHttpTransport , httpUrl , uvxPath , fromArgs , packageName , uvxDevFlags ,
756756 apiKey , serverTransport ) ;
757757 }
758758 }
@@ -763,7 +763,7 @@ public void ConfigureWithCapturedValues(
763763 private void RegisterWithCapturedValues (
764764 string projectDir , string claudePath , string pathPrepend ,
765765 bool useHttpTransport , string httpUrl ,
766- string uvxPath , string fromArgs , string packageName , bool shouldForceRefresh ,
766+ string uvxPath , string fromArgs , string packageName , string uvxDevFlags ,
767767 string apiKey ,
768768 Models . ConfiguredTransport serverTransport )
769769 {
@@ -789,10 +789,8 @@ private void RegisterWithCapturedValues(
789789 }
790790 else
791791 {
792- // Note: --reinstall is not supported by uvx, use --no-cache --refresh instead
793- string devFlags = shouldForceRefresh ? "--no-cache --refresh " : string . Empty ;
794792 // Use --scope local to register in the project-local config, avoiding conflicts with user-level config (#664)
795- args = $ "mcp add --scope local --transport stdio UnityMCP -- \" { uvxPath } \" { devFlags } { fromArgs } { packageName } ";
793+ args = $ "mcp add --scope local --transport stdio UnityMCP -- \" { uvxPath } \" { uvxDevFlags } { fromArgs } { packageName } ";
796794 }
797795
798796 // Remove any existing registrations from ALL scopes to prevent stale config conflicts (#664)
@@ -867,9 +865,7 @@ private void Register()
867865 else
868866 {
869867 var ( uvxPath , _, packageName ) = AssetPathUtility . GetUvxCommandParts ( ) ;
870- // Use central helper that checks both DevModeForceServerRefresh AND local path detection.
871- // Note: --reinstall is not supported by uvx, use --no-cache --refresh instead
872- string devFlags = AssetPathUtility . ShouldForceUvxRefresh ( ) ? "--no-cache --refresh " : string . Empty ;
868+ string devFlags = AssetPathUtility . GetUvxDevFlags ( ) ;
873869 string fromArgs = AssetPathUtility . GetBetaServerFromArgs ( quoteFromPath : true ) ;
874870 // Use --scope local to register in the project-local config, avoiding conflicts with user-level config (#664)
875871 args = $ "mcp add --scope local --transport stdio UnityMCP -- \" { uvxPath } \" { devFlags } { fromArgs } { packageName } ";
@@ -977,9 +973,7 @@ public override string GetManualSnippet()
977973 return "# Error: Configuration not available - check paths in Advanced Settings" ;
978974 }
979975
980- // Use central helper that checks both DevModeForceServerRefresh AND local path detection.
981- // Note: --reinstall is not supported by uvx, use --no-cache --refresh instead
982- string devFlags = AssetPathUtility . ShouldForceUvxRefresh ( ) ? "--no-cache --refresh " : string . Empty ;
976+ string devFlags = AssetPathUtility . GetUvxDevFlags ( ) ;
983977 string fromArgs = AssetPathUtility . GetBetaServerFromArgs ( quoteFromPath : true ) ;
984978
985979 return "# Register the MCP server with Claude Code:\n " +
0 commit comments