The greenhouse effect, commonly associated with lower-atmospheric warming, manifests as cooling in the middle and upper atmosphere. Carbon dioxide is the main cooler and its continuing rise has been demonstrated to result in dramatic temperature reductions, particularly in the thermosphere. In a hydrostatic atmosphere, the cooling is associated with a density decrease at a given height. The stratospheric ozone depletion documented in satellite observations since 1979 and a steady increase of water vapor are also expected to introduce a net cooling in the middle atmosphere primarily via a reduced solar heating and increased emissions in the infrared, respectively. These effects are simulated with the global spectral mesosphere/lower thermosphere model (SMLTM) extending approximately from the tropopause to over 200 km. Climatological distributions of the radiatively active gases are prescribed in the model, which makes it suitable for studies with imposed realistic trends in CO2, O3, and H2O approximately corresponding to the period 1980 2000. Although confined to the stratosphere, the ozone depletion has a profound cooling effect on mesospheric temperatures, which is comparable to or exceeding that of the CO2 forcing. The water vapor cooling appears to play a secondary but non-negligible role, especially in the overall density reduction in the lower thermosphere. The additional hydrostatic contraction of the colder middle atmosphere is predicted to result in a local maximum of the density decline near 110 km of up to -6.5% per decade over the twenty-year period.