Mn doping of group-IV semiconductors (Si/Ge) is achieved by embedding a thin Mn-film as a {delta}-doped layer in group-IV matrix. The Mn-layer consists of a dense layer of monoatomic Mn-wires, which are oriented perpendicular to the Si(001)-(2x1) dimer rows, or Mn-clusters. The nanostructures are covered with an amorphous Si or Ge capping layer, which conserves the identity of the {delta}-doped layer. The analysis of the bonding environment with STM is combined with the element-specific detection of the magnetic signature with X-ray magnetic circular dichroism. The largest moment (2.5 {mu}B/Mn) is measured for Mn-wires, which have ionic bonding character, with an a-Ge overlayer cap, a-Si capping leads to a slightly reduced moment which has its origin in subtle variation of bonding geometry. Our results directly confirm theoretical predictions on magnetism for Mn-adatoms on Si(001). The moment is quenched to 0.5{mu}B/Mn for {delta}-doped layers, which are dominated by clusters, and thus develop an antiferromagnetic component from Mn-Mn bonding.