We present a novel simulation technique, within the framework of a molecular dynamics simulation, which accounts for both two- and three-body dispersion interactions, up to the triple-quadrupole interaction. This technique involves a unification of molecular dynamics and quantum-mechanical variational methods, in the spirit of the Car-Parrinello method. The advantage of this new method compared to existing techniques for simulating three-body dispersion forces, is that it allows for a consistent treatment of both dispersion damping and periodic boundary conditions at the pair and three-body level. The latter means that it would be possible, for the first time, to include many-body dispersion effects in the simulation of bulk properties of materials, without making use of effective pair potentials.