We demonstrate a resonant gas sensor uniformly coated with a metal-organic framework (MOF) and excited near the second vibration mode for enhanced sensitivity. The possibility of realizing a smart switch triggered upon exceeding a threshold mass is demonstrated when operating the resonator near the dynamic pull-in instability. The resonator is based on an electrostatically excited clamped-clamped microbeam. The microbeam is fabricated from a polyimide layer coated from top with Cr/Au and from bottom with Cr/Au/Cr layer. The geometry of the resonator is optimized to reduce the effect of squeeze film damping, thereby allowing operation under atmospheric pressure. The electrostatic electrode is designed to enhance the excitation of the second mode of vibration with the minimum power required. Significant frequency shift in kilohertz is demonstrated for the first time upon water, acetone, and ethanol vapor exposure due to the MOF functionalization and the higher order mode excitation. The adsorption dynamics and MOF selectivity are investigated by studying the decaying time constants of the response upon gas exposure.