The adsorption energies of small molecules in nanoporous materials are often determined by isotherm measurements. The nature of the interaction and the response of the host material, however, can best be studied by spectroscopic methods. We show here that infrared absorption and Raman spectroscopy measurements together with density functional theory calculations, utilizing the novel van der Waals density functional vdW-DF, constitute a powerful approach to studying the weak van der Waals interactions associated with the incorporation of small molecules in these materials. In particular, we show how vdW-DF assists the interpretation of the vibrational spectroscopy data to uncover the binding sites and energies of these molecules, including the subtle dependence on loading of the IR asymmetric stretch mode of CO2 when adsorbed in MOF-74–Mg. To gain a better understanding of the adsorption mechanism of CO2 in MOF-74–Mg, the results are compared with CO within MOF-74–Mg.