Conventional adsorbents, namely zeolites and silica gel, are often used to control humidity by adsorbing water; however, adsorbents capable of the dual functionality of humidification and dehumidification, offering the desired control of the moisture level at room temperature, have yet to be explored. Here we report Y-shp-MOF-5, a hybrid microporous highly connected rare-earth-based metal-organic framework (MOF), with dual functionality for moisture control within the recommended range of relative humidity (45%-65% RH) set by the American Society of Heating, Refrigerating, and Air-Conditioning Engineers (ASHRAE). Y-shp-MOF-5 exhibits exceptional structural integrity, robustness, and unique humidity-control performance, as confirmed by the large number (thousand) of conducted water vapor adsorption-desorption cycles. The retained structural integrity and the mechanism of water sorption were corroborated using in situ single-crystal X-ray diffraction (SCXRD) studies. The resultant working water uptake of 0.45 g·g-1 is solely regulated by a simple adjustment of the relative humidity, positioning this hydrolytically stable MOF as a prospective adsorbent for humidity control in confined spaces, such as space shuttles, aircraft cabins, and air-conditioned buildings.