The X-shooter Spectral Library (XSL) is a large empirical stellar library used as a benchmark for the development of stellar population models. The inclusion of alpha-elements abundances is crucial to disentangling the chemical evolution of any stellar system. This paper provides a catalogue of high-precision and accurate magnesium and calcium abundances from a wide variety of stars well distributed in the Hertzsprung-Russell (HR) diagram. We originally performed an analysis of the derived Mg and Ca abundances for medium-resolution spectra from the XSL Data Release 2. For this purpose, we used the GAUGUIN automated abundance estimation code to fit the ultraviolet-blue (UVB) and visible (VIS) spectra. We tested the consistency of the atmospheric parameters and chemical abundances with the Gaia DR3 and the AMBRE Project datasets.We have obtained precise [Mg/Fe] and [Ca/Fe] abundances for 192 and 217 stars respectively, from which 174 stars have measurements in both elements. The stars cover a broad range of effective temperature 4000<Teff<6500K, surface gravity 0.3<log(g)<4.8cm/s^2^, and metallicity -2.5<[Fe/H]<+0.4dex. We find an excellent agreement with the abundance estimates from the AMBRE:HARPS and the Gaia/RVS analysis. Moreover, the resulting abundances reproduce a plateau in the metal-poor regime followed by a decreasing trend even at supersolar metallicities, as predicted by Galactic chemical evolution models. This catalogue is suitable for improving the modelling of evolutionary stellar population models with empirical alpha-enhancements, which could significantly contribute to the analysis of external galaxies abundances in the near future.