The objective of this paper is to demonstrate the integration of a MOF thin film on electrostatically actuated microstructures to realize a switch triggered by gas and a sensing algorithm based on amplitude tracking. The devices are based on the nonlinear response of micromachined clamped-clamped beams. The microbeams are coated with a metal-organic framework (MOF), namely HKUST-1, to achieve high sensitivity. The softening and hardening nonlinear behaviors of the microbeams are exploited to demonstrate the ideas. For gas sensing, an amplitude-based tracking algorithm is developed to quantify the captured quantity of gas. Then, a MEMS switch triggered by gas using the nonlinear response of the microbeam is demonstrated. Noise analysis is conducted, which shows that the switch has high stability against thermal noise. The proposed switch is promising for delivering binary sensing information, and also can be used directly to activate useful functionalities, such as alarming.