Context : Aims : In this work we develop a technique to obtain high precision determinations of both metallicity and effective temperature of M dwarfs in the optical . Methods : A new method is presented that makes use of the information of 4104 lines in the 530-690 nm spectral region . It consists in the measurement of pseudo equivalent widths and their correlation with established scales of [ Fe/H ] and T _ { eff } . Results : Our technique achieves a rms of 0.08 \pm 0.01 for [ Fe/H ] , 91 \pm 13 K for T _ { eff } , and is valid in the ( -0.85 , 0.26 dex ) , ( 2800 , 4100 K ) , and ( M0.0 , M5.0 ) intervals for [ Fe/H ] , T _ { eff } and spectral type respectively . We also calculated the RMSE _ { V } which estimates uncertainties of the order of 0.12 dex for the metallicity and of 293 K for the effective temperature . The technique has an activity limit and should only be used for stars with \log { L _ { H _ { \alpha } } / L _ { bol } } < -4.0 . Our method is available online at http : //www.astro.up.pt/resources/mcal . Conclusions :