A queueing model of the Markov-modulated Poisson process (MMPP) with thresholds was investigated. The customer arrival with various arrival rates in the model was viewed as the MMPP. In contrast to the Poisson’s arrival process, the MMPP can better describe the situation that the arrival rate changes with changing conditions; therefore, the model fits better with reality. The threshold conversion was added to the model based on the general MMPP/M/C model. When the number of customers in the system exceeds a threshold, all servers work to serve; when the number of customers in the system is less than another threshold, some servers are shut down. This is the congestion-based staffing policy with two thresholds. Specifically, the problems in the slab stocking stage of slab production at the Iron and Steel Complex in China were analysed. In the slab production process, because the rate of the upstream steelmaking is not constant, the rate of slab reaching the slab yard is uncertain. The crane service is used to store slabs in a warehouse. Because the slab arrival rate varies, different numbers of cranes in service need to be optimized for cost control. Thus, MMPP was used to describe slab arrival with varied arrival rates. Therefore, an MMPP/M/C queue with thresholds was used to analyse and solve the practical problems, and the optimal number of service cranes was obtained to minimize the cost of slab stocking.