A planet’s ability to keep an atmosphere depends largely on its mass and surface temperature, as well as on the composition of the atmosphere itself. Large planets with strong gravitational fields, such as Earth, are more likely to retain their atmosphere. Since Mercury is a small planet compared to Earth it was once thought that any gases on Mercury would have escaped into space long ago. Yet the onboard instruments of Mariner 10 showed that Mercury does have a trace atmosphere. The atmospheric pressure is quite small - about one trillion times less than that at sea level on Earth. Elements known to be present in the Mercurian atmosphere include helium, sodium, and oxygen.
Learn about the Temperature of Mercury