We report numerical studies of the magnetic phase transition and magnetocaloric effect in hexagonal MnCoGe alloys, controlled by axial strain applied along the c-axis direction around room temperature. These studies are based on a combination of first-principles calculations and Monte Carlo simulations. Under compressive strains, the ferromagnetic state is stable, whereas under tensile strains, the ground state transforms into an antiferromagnetic state. The magnetic exchange couplings between elements are quantified using an SPR-KKR code, revealing that the exchange coupling between the first to fourth nearest-neighbor Mn-Mn pairs primarily determines the magnetic phase transition behaviors. By varying the compressive strains from 0% to -7.8%, the magnetic phase transition temperature increases monotonically from 284 K to 319 K. Additionally, the maximum magnetic entropy change under a magnetic field change of ΔH = 1 T decreases to one-third of its value without applied strains and occurs at higher temperatures. The second-order magnetic phase transition properties influenced by strains are also discussed. Our findings indicate that the strain not only enhances the magnetic stability of alloys but also improves the linear control of the magnetocaloric effect by magnetic field.