Caries is considered to be the most prevalent non-communicable disease in humans, mainly deriving from acidogenic bacterial biofilm and resulting in the demineralization and decomposition of hard dental tissue. Herein, a composite responsive foam brace loaded with magnesium organic framework (MPC) is designed for caries prevention and tooth remineralization. MPC can intelligently release organic antibacterial molecules (gallic acid) and mineralized ions (Mg2+, Ca2+ and PO43−) under acidic conditions (pH