In this work, we propose a novel online thermal management approach based on model predictive control for 3D multi-processors system on chip (MPSoCs) using microfluidic cooling. The controller uses dynamic voltage and frequency scaling (DVFS) for the computational cores and adjusts the liquid flow rate to meet the desired performance requirements and to minimize the overall MPSoC energy consumption (MPSoC power consumption+cooling power consumption). Our experimental results illustrate that our policy satisfies performance requirements and maintains the temperature below the specified threshold, while reducing cooling energy by up to 50% compared with traditional state-of-the-art liquid cooling techniques. The proposed policy also keeps the thermal profile up to 18°C lower compared with state of the art 3D thermal management using variable-flow liquid cooling.