The magnetic state and magnetic coupling of individual atoms in nanoscale structures relies on a delicate balance between different interactions with the atomic-scale surrounding. Using scanning tunneling microscopy, we resolve the self-assembled formation of highly ordered bilayer structures of Fe atoms and organic linker molecules (T4PT) when deposited on a Au(111) surface. The Fe atoms are encaged in a three-dimensional coordination motif by three T4PT molecules in the surface plane and an additional T4PT unit on top. Within this crystal field, the Fe atoms retain a magnetic ground state with easy-axis anisotropy, as evidenced by X-ray absorption spectroscopy and X-ray magnetic circular dichroism. The magnetization curves reveal the existence of ferromagnetic coupling between the Fe centers.