Construction of single-molecule electronic devices requires the controlled manipulation of organic molecules and their properties. This could be achieved by tuning the interaction between the molecule and individual atoms by local “on-surface” chemistry, i.e., the controlled formation of chemical bonds between the species. We demonstrate here the reversible attachment of a planar conjugated polyaromatic molecule to a pair of unpassivated dangling bonds on a hydrogenated Ge(001):H surface via a Diels–Alder [4+2] addition using the tip of a scanning tunneling microscope (STM). Due to the small stability difference between the covalently bonded and a nearly undistorted structure attached to the dangling bond dimer by long-range dispersive forces, we show that at cryogenic temperatures the molecule can be switched between both configurations. The reversibility of this covalent bond forming reaction may be applied in the construction of complex circuits containing organic molecules with tunable properties.