The main purpose of this study is to use the IUE spectra in the analysis of magnetic activity of main sequence F-K stars. Combining IUE observations of MgII and optical spectroscopy of Ca II, the registry of ctivity of stars can be extended in time. We retrieved all the high-resolution spectra of F, G, and K main sequence stars observed by IUE (i.e. 1623 spectra of 259 F to K dwarf stars). We obtained the continuum surface flux near the Mg II h+k lines near 2800 \AA and the MgII line-core surface flux from the IUE spectra. We obtained a relation between the mean continuum flux near the MgII lines with the colour $B-V$ of the star. For a set of 117 nearly simultaneous observations of Mg II and Ca II fluxes of 21 F5 to K3 main sequence stars, we obtained a colour dependent relation between the Mount Wilson CaII S-index and the MgII emission line-core flux. As an application of this calibration, we computed the Mount Wilson index for all the dF to dK stars which have high resolution IUE spectra. For some of the most frequently observed main sequence stars, we analysed the Mount Wilson index S from the IUE spectra, together with the ones derived from visible spectra. We confirm the cyclic chromospheric activity of epsilon Eri (HD 22049) and beta Hydri (HD 2151), and we find a magnetic cycle in alpha Cen B (HD 128621). Complete abstract in the paper.