In this paper, self-tuning model predictive control (MPC) based on a type-2 fuzzy system for microgrid frequency is presented. The type-2 fuzzy system calculates the parameters and coefficients of the control system online. In the microgrid examined, there are sources of photovoltaic power generation, wind, diesel, fuel cells (with a hydrogen electrolyzer), batteries and flywheels. In simulating the load changes, changes in the production capacity of solar and wind resources as well as changes (uncertainty) in all parameters of the microgrid are considered. The performances of three control systems including traditional MPC, self-tuning MPC based on a type-1 fuzzy system and self-tuning MPC based on a type-2 fuzzy system are compared. The results show that type-2 fuzzy MPC has the best performance, followed by type-1 fuzzy MPC, with a slight difference between the two results.