Linear CoCunCo clusters on Cu(111) fabricated by atomic manipulation represent a two-site Kondo system with tunable interaction. Scanning tunneling spectroscopy reveals oscillations of the Kondo temperature T-K with the number n of Cu atoms for n >= 3. Density functional calculations show that the Ruderman-Kittel-Kasuya-Yosida interaction mediated by the Cu chains causes the oscillations. Calculations find ferromagnetic and antiferromagnetic interaction for n = 1 and 2, respectively. Both interactions lead to a decrease of T-K as experimentally observed.