We present a new atomic model for MgI that that encompasses and improves upon the model presented in Peralta et al. (2022A&A...657A.108P) for the Sun. We test our model on three stars through their populations and spectral lines. The distribution of Mg between ionization states for stars with different effective temperatures was compared. For the Sun and Epsilon Eridani, MgII predominates with more than 95 %, while for GJ 832 and GJ 581, MgI with more than 72%. Moreover, in the latter two, the amount of magnesium forming molecules in their atmosphere is at least 2 orders higher. Regarding the NLTE population, a noticeable lower variability in the departure coefficients was found, indicating a better population coupling for the new model. A comparison of the synthetic spectrum calculated between the older and new MgI atomic model shows minimal differences in the visible range, but stronger in the IR for all the stars. This aspect should be taken into account when using lines from this region as indicators. Nevertheless, some changes with the spectral type were found, emphasizing also the need to test the atomic models in different atmospheric conditions. In the FUV and NUV the most noticeable changes occurred, obtaining a higher flux for the new atomic model, regardless of the spectral type. The new model did not prevent the formation of the core emission in the NUV line 2853{AA}. However, by including other observations we could note that the emission indeed exists, although with a much lower intensity. Further tests showed that to reduce the emission, the population of its upper level (3s3p 1P) should be reduced by a factor of about 0.01.