We report a building blocks approach providing a direct route to multifunctional MOFs, that display photoluminescent properties, robustness, porosity and in some cases unique magnetic properties. The self-assembly of [Mo(CN)8]4− with several in situ prepared lanthanide building blocks gives 3D robust porous networks with open channels. This approach solves the coordination problem, allowing exact placement of the lanthanide ions within the structure. Our MOFs feature good thermal stability and permanent porosity thanks to the strong carboxylate and cyanide linkages. The fact that we have both nitrogen-containing ligand and a π-system means that these MOFs can be excited using low-energy photons. Efficient visible emission was observed for MOFs containing Eu(III) and Tb(III). Surprisingly, the Tb-MOF shows ferromagnetic behavior, proving that the magnetic interaction between Tb(III) ions is strong enough to compensate the ligand field effects.