We show that the magnetic anisotropy energy (MAE) in cobalt clusters can be significantlyenhanced by doping them with group IV elements. Our firstprincipleselectronic structurecalculations show that Co4C2 and Co12C4 clusters have MAEs of 25 K and 61 K, respectively. The large MAE is due to controlled mixing between Co dandC pstatesand can be furthertuned by replacing C by Si. Larger assemblies of such primitive units are shown to be stablewith MAEs exceeding 100 K in units as small as 1.2 nm, in agreement with the recentobservation of large coercivity. These results may pave the way for the use of nanoclustersinhigh density magnetic memory devices for spintronics applications