This study explores the challenge of achieving consensus in multi-agent systems (MASs) when facing the random packet dropouts and disturbances. It employs memory state-feedback control (MSFC) in the context of undirected graphs and specified leader agents. The analysis focuses on mean square consensus, considering MASs within strongly connected networks or networks with undirected spanning trees. The MSFC approach is developed to ensure asymptotic consensus despite packet dropouts and also to reduce the impact of disturbances. Specifically, the consensus analysis leverages the Lyapunov-Krasovskii functional (LKF) framework, and the necessary conditions for implementing the proposed MSFC are established using linear matrix inequalities (LMIs). The system, augmented with an H ∞ attenuation level is guaranteed to achieve asymptotic mean-square stability according to the provided criteria. In conclusion, two examples are provided to illustrate the effectiveness and practicality of the proposed control mechanism.