This article focuses on the development of a general energy management system (EMS) design methodology using on model-based predictive control (MPC) for the control and management of microgrids. Different MPC-based EMS for microgrids have been defined in the literature; however, there is a lack of generality in the proposed that would facilitate adapting to new architectures, energy storage system technology, nature of the bus, application, or purpose. To fill this gap, a novel general formulation that is parameterizable, simple, easily interpretable, and reproducible in different microgrid architectures is presented. This is the result of the development of a novel methodology, which is also presented. It considers the state space formulation of the controller from the initial modelling phase, from the dynamics of the energy storage systems represented by their models to the subsequent definition of the optimisation problem. This is developed through the design of the general cost function and the formulation of constrains, by means of general guidelines and reference values. To evaluate the performance of the developed methodology, simulation tests were carried out for four different microgrid architectures, with different applications and objectives, also considering different generation conditions, demand profiles, and initial conditions. The results showed that, with some simple guidelines and regardless of the case study, the developed MPC controller design methodology can address the technical-economic optimisation problem associated with energy management in microgrids in an easy and intuitive way.