In this work, we present a detailed theoretical investigation of the electronic and magnetic properties of ferromagnetic slabs and clusters deposited on SrTiO$\_3$ via first-principles, with a particular emphasis on the magneto-crystalline anisotropy (MCA). We found that in the case of Fe films deposited on SrTiO$\_3$ the effect of the interface is to quench the MCA whereas for Cobalt we observe a change of sign of the MCA from in-plane to out-of-plane as compared to the free surface. We also find a strong enhancement of MCA for small clusters upon deposition on a SrTiO$\_3$ substrate. The hybridization between the substrate and the $d$-orbitals of the cluster extending in-plane for Fe and out-of-plane for Co is at the origin of this enhancement of MCA. As a consequence, we predict that the Fe nanocrystals (even rather small) should be magnetically stable and are thus good potential candidates for magnetic storage devices.