Most gas sensors suffer from the cross sensitivity to environmental temperature, which significantly reduces the accuracy and reliability of measurements. Current solutions require the fabrication of a thermometer in close proximity to the gas sensor or an identical reference sensor to compensate for the sensor drift due to temperature. This increases the device size, fabrication cost, and the power required to operate the sensor; and also adds to the complexity of the device circuit for signal processing. Here, we demonstrate a single resonant gas sensor, based on a microbeam uniformly coated with metal-organic frameworks (MOFs), capable of simultaneously measuring environmental temperature and gas concentration (water vapor). Using the electrostatic harmonic voltage, we actuate the microbeam simultaneously near the first and second vibration modes. The frequency shifts of these two modes due to physical stimuli changes are monitored in real time. The lower electrode of the clamped-clamped microbeam resonator is perforated to reduce the effect of squeeze film damping, thereby allowing operation under atmospheric pressure. We demonstrate experimentally the effectiveness of this technique to measure the environmental temperature and gas concentration. Based on the theoretical analysis and the Allan deviation results, a minimum detectable temperature of 0.03 °C and water vapor concentration of 4.6 ppm is demonstrated.