To improve the accuracy of coal and gas prominence prediction, an improved sparrow search algorithm (ISSA) and an optimized support vector machine (SVM) based on the Markov chain Monte Carlo (MCMC) filling algorithm prediction model were proposed. The mean value of the data after filling in the missing values in the coal and gas prominence data using the MCMC filling algorithm was 2.282, with a standard deviation of 0.193. Compared with the mean fill method (Mean), random forest filling method (random forest, RF), and K-nearest neighbor filling method (K-nearest neighbor, KNN), the MCMC filling algorithm showed the best results. The parameter indicators of the salient data were ranked by entropy-weighted gray correlation analysis, and the salient prediction experiments were divided into four groups with different numbers of parameter indicators according to the entropy-weighted gray correlation. The best results were obtained in the fourth group, with a maximum relative error (maximum relative error, REmax) of 0.500, an average relative error (average relative error, MRE) of 0.042, a root mean square error (root mean square error, RMSE) of 0.144, and a coefficient of determination (coefficient of determination, R2) of 0.993. The best predicted parameters were the initial velocity of gas dispersion (X2), gas content (X4), K1 gas desorption (X5), and drill chip volume (X6). To improve the sparrow search algorithm (sparrow search algorithm, SSA), the adaptive t-distribution variation operator was introduced to obtain ISSA, and the prediction models of improved sparrow search algorithm optimized support vector machine based on Markov chain Monte Carlo filling algorithm (MCMC-ISSA-SVM), sparrow search algorithm optimized support vector machine based on Markov chain Monte Carlo filling algorithm (MCMC-SSA-SVM), genetic algorithm optimized support vector machine based on Markov chain Monte Carlo filling algorithm (MCMC-GA-SVM) and particle swarm optimization algorithm optimized support vector machine based on Markov chain Monte Carlo filling algorithm (MCMC- PSO -SVM) were established for coal and gas prominence prediction using the ISSA, SSA, genetic algorithm (genetic algorithm, GA) and particle swarm optimization algorithm (particle swarm optimization, PSO) respectively. Comparing the prediction experimental results of each model, the prediction accuracy of MCMC-ISSA-SVM is 98.25%, the error is 0.018, the convergence speed is the fastest, the number of iterations is the least, and the best fitness and the average fitness are the highest among the four models. All the prediction results of MCMC-ISSA-SVM are significantly better than the other three models, which indicates that the algorithm improvement is effective. ISSA outperformed SSA, PSO, and GA, and the MCMC-ISSA-SVM model was able to significantly improve the prediction accuracy and effectively enhance the generalization ability.