  Two-impurity Kondo models are paradigmatic for correlated spin-fermion
systems. Working with Mn atoms on Au(111) covered by a monolayer of MoS$_2$, we
tune the inter-adatom exchange via the adatom distance and the adatom-substrate
exchange via the location relative to a moir\'e structure of the substrate.
Differential-conductance measurements on isolated adatoms exhibit Kondo peaks
with heights depending on the adatom location relative to the moir\'e
structure. Mn dimers spaced by a few atomic lattice sites exhibit split Kondo
resonances. In contrast, adatoms in closely spaced dimers couple
antiferromagnetically, resulting in a molecular-singlet ground state. Exciting
the singlet-triplet transition by tunneling electrons, we find that the
singlet-triplet splitting is surprisingly sensitive to the moir\'e structure.
We interpret our results theoretically by relating the variations in the
singlet-triplet splitting to the heights of the Kondo peaks of single adatoms,
finding evidence for coupling of the adatom spin to multiple conduction
electron channels.
