The surrounding geological conditions and supporting structures of underground engineering are often updated during construction, and these updates require repeated numerical modeling. To improve the numerical modeling efficiency of underground engineering, a modularized and parametric modeling cloud server is developed by using Python codes. The basic framework of the cloud server is as follows: input the modeling parameters into the web platform, implement Rhino software and FLAC 3D software to model and run simulations in the cloud server, and return the simulation results to the web platform. The modeling program can automatically generate instructions that can run the modeling process in Rhino based on the input modeling parameters. The main modules of the modeling program include modeling the 3D geological structures, the underground engineering structures, and the supporting structures as well as meshing the geometric models. In particular, various cross-sections of underground caverns are crafted as parametric modules in the modeling program. The modularized and parametric modeling program is used for a finite element simulation of the underground powerhouse of the Shuangjiangkou Hydropower Station. This complicated model is rapidly generated for the simulation, and the simulation results are reasonable. Thus, this modularized and parametric modeling program is applicable for three-dimensional finite element simulations and analyses.