With the gradual depletion of fossil energy and the increasingly serious environmental pollution problems, the combined cooling heating and power (CCHP) microgrid with renewable energy sources which with high energy efficiency, less pollution emissions and flexible operation control have become research hotspots. In this paper, the optimal planning of CCHP microgrid with renewable energy sources is studied, and the mathematical model of optimal configuration of the system is established with the minimum total cost as the objective function, then the separated production (SP) system is used as a reference to compare the optimal configuration results of the CCHP microgrid system under the two modes of following the thermal load (FTL) and following the electric load (FEL). After that, the optimization configuration results of the two schemes of whether the CCHP microgrid system is equipped with the thermal storage tank (TST) in the same operating mode are compared. The simulation result shows that the system with TST under the FEL mode is more economical, energy-saving and environmentally friendly. Finally, the effects of natural gas price and electricity price on the optimal configuration results of the system in two operating modes are studied.