Tomato stems can pollute the environment and also cause resource costs. In this study, five combinations of microbial agents were added to tomato stems for aerobic composting to find effective microbial formulations to improve composting performance and product quality through comparative analysis. Six treatments were set up: T1 (Microbial agents A), T2 (0.5% Microbial agents B), T3 (0.5% Microbial agents C), T4 (0.5% Microbial agents D), T5 (0.5% Microbial agents E) and T6 (no addition). The physicochemical parameters of the composting system were measured, and the dynamics of the microbial community during the composting process were studied using high-throughput sequencing technology. The results showed that the T1 treatment had a longer high-temperature period than T6 and the highest cellulose degradation rate (62.0%). The contents of total phosphorus (TP), total potassium (TK) and effective potassium (AK) were 8.11 g·kg−1, 53.98 g·kg−1 and 45.62 g·kg−1, respectively, at the end of composting, representing increases of 270.3%, 56.6% and 25.40% compared to the initial values, significantly higher than the control (p < 0.05). The Chao1 and Shannon indexes of T1 treatment were 73.5% and 41.7% higher in the compost decay stage for bacteria, and 50.2% and 18.1% for fungi, significantly higher than in T6 (p < 0.05) compared to the initial values. During the high-temperature phase, the abundance of Aspergillus increased (4.13% to 44.24%) the abundance of Staphylococcus decreased (58.31% to 8.90%). In terms of numbers and species diversity, bacterial communities were more abundant than fungal communities. Proteobacteria, Firmicutes, Actinomycetes and Bacteroides were the four main bacterial phyla, while Ascomycetes was the absolutely dominant fungal phylum. In conclusion, the addition of microbial agent A can effectively improve the nutrient content of tomato stem compost, promote the maturation of compost, and regulate the microbial community structure and can realize the resource utilization of tomato stems.