The junctions formed at the contact between metallic electrodes and semiconductor materials are crucial components of electronic and optoelectronic devices 1 . Metal-semiconductor junctions are characterized by an energy barrier known as the Schottky barrier, whose height can, in the ideal case, be predicted by the Schottky-Mott rule2-4 on the basis of the relative alignment of energy levels. Such ideal physics has rarely been experimentally realized, however, because of the inevitable chemical disorder and Fermi-level pinning at typical metal-semiconductor interfaces2,5-12. Here we report the creation of van der Waals metal-semiconductor junctions in which atomically flat metal thin films are laminated onto two-dimensional semiconductors without direct chemical bonding, creating an interface that is essentially free from chemical disorder and Fermi-level pinning. The Schottky barrier height, which approaches the Schottky-Mott limit, is dictated by the work function of the metal and is thus highly tunable. By transferring metal films (silver or platinum) with a work function that matches the conduction band or valence band edges of molybdenum sulfide, we achieve transistors with a two-terminal electron mobility at room temperature of 260 centimetres squared per volt per second and a hole mobility of 175 centimetres squared per volt per second. Furthermore, by using asymmetric contact pairs with different work functions, we demonstrate a silver/molybdenum sulfide/platinum photodiode with an open-circuit voltage of 1.02 volts. Our study not only experimentally validates the fundamental limit of ideal metal-semiconductor junctions but also defines a highly efficient and damage-free strategy for metal integration that could be used in high-performance electronics and optoelectronics.