• To propose a more comprehensive, complete and detailed CIES planning model • To propose a co-optimization strategy for CTM and IDR on supply and demand sides. • To propose an SMMS game model that optimizes the three parties in the community. • To propose an energy supply location strategy for improving the supplier's profit. The integrated energy system (IES) is an effective way to meet multi-energy needs, improve energy utilization, and reduce pollution emissions. However, in the existing research, the coordinated optimization of carbon trading mechanism (CTM) and integrated demand response (IDR) has not been fully considered in the operation of IES. Therefore, a game optimization model of single-master-multiple-slaves (SMMS) considering CTM and IDR for the community integrated energy system (CIES) is proposed. First, a comprehensive CIES framework is proposed. CTM and IDR are modelled and analyzed. In addition, the community users are divided into office worker aggregators and retiree aggregators. The community integrated energy service provider (CIESP) acts as the leader, and the two user aggregators act as followers to optimize the game model of SMMS. Finally, the effectiveness of the proposed coordination optimization model is verified through multiple case studies. The results show that the profit of CIESP increased by 15.48%, and the consumer surplus of office worker aggregator and retiree aggregator increased by 9.34% and 9.82%, respectively. The operational strategies under different user participation degrees are also analyzed. The results also show that CIESP can choose a community with a higher participation degree of office workers to obtain more benefits.