Flammable gas leaks such as Methane and Liquefied Petroleum Gas (LPG) pose serious risks of fire, explosion, and gas poisoning. This research develops a gas leak detection system based on the MQ-2 sensor, Wemos D1 microcontroller, and Internet of Things (IoT) technology. The system quickly and accurately detects gas leaks, provides automatic responses by shutting off gas flow via a solenoid valve, and activates a water nozzle valve for fire suppression. Real-time notifications are sent through the WhatsApp API. Testing showed response times of <5 seconds for gas leaks and <1 second for fires. The system is effective, real-time, and applicable in various environments