The electronic, mechanical, and vibrational properties of MgB7 are investigated by means of density functional theory as implemented in pseudo-potential plane wave approach. Using the calculated elastic constants, the bulk modulus, shear modulus, Young's modulus, Possion's ratio, Debye temperature, hardness, and anisotropy value were derived. It is found that MgB7 in considered structure is mechanically stable and exhibits brittle character according to the B/G criterion. The band structure of this compound is a semiconductor with an indirect band gap. Furthermore, the phonon dispersion, density of states, Born effective charge tensors, Gruneisen parameter, temperature-dependent variations of the internal energy, free energy, entropy, and heat capacity are also computed and discussed. (C) 2013 Elsevier Ltd. All rights reserved.