This preliminary study presents a prototype of an Internet of Things (IoT)-based leak detection system for water distribution pipelines. Water loss in conventional networks can reach 20–50% due to delayed response. This research aims to design a prototype that monitors flow rate patterns from multiple pipeline points to identify leak locations based on deviations from normal flow. The system integrates ESP32 microcontrollers and flow sensors across four nodes, transmitting data in real-time to a PHP-based graphical interface via the MQTT protocol. Controlled experiments were conducted using a small-scale prototype with two simulated leak points. Unlike conventional systems that solely rely on monitoring, this architecture implements a closed-loop control mechanism for automated mitigation. Test results show the system successfully localized leaks with a 100% success rate across 13 simulated scenarios without any false positives. Hydraulic anomalies, characterized by increased flow at the sensor before the leak point (due to pump compensation) and a drastic flow reduction at the sensor after the leak point, proved to be effective localization parameters. Communication system evaluation recorded data transmission operating with <1-second latency and 0% data loss. Furthermore, the automated mechanism successfully executed the pump shutdown command (relay off) within 1-2 seconds after a leak was detected. These results confirm the reliability of the proposed architecture in rapidly minimizing water loss. Future research will focus on field testing, sensor optimization, and the development of predictive models.