We have explored the structural, electronic, optical, and mechanical properties of the magnesium-based chalcopyrites MgSiP2, MgSiAs2, and MgSiSb2 using density functional theory with five different generalized gradient approximation (GGA) functionals: Perdew-Wang (1991), Perdew-Burke-Ernzerhof, revised Perdew-Burke-Ernzerhof, modified Perdew-Burke-Ernzerhof for solids, and Armiento-Mattson (2005) as well as the local density approximation. Change of the constituent element from P to Sb significantly affected the lattice constants, elastic constants, and thermal and dielectric properties. Our theoretically computed results are in reasonable agreement with experiments and other theoretical calculations. The electronic band structure results imply that all three considered compounds are semiconductors. MgSiP2 has the highest value of elastic constants, and bulk and shear moduli compared with the other two binary chalcopyrites. Furthermore, the optical response in terms of the dielectric functions, optical reflectivity, refractive index, extinction coefficient, and electron energy loss of the compounds were also investigated in the energy range from 0 eV to 15 eV. The calculated optical results reveal optical polarization anisotropy for all three compounds, making them useful for optoelectronic device applications. Moreover, specific focus is also given to quantify the dependence of various thermal properties on finite pressure/temperature within the quasiharmonic approximation.