MgFeAs2O7 crystallizes in the monoclinic P2_1/c space group. Mg(1) is bonded to one O(1), one O(5), one O(6), one O(7), and two equivalent O(3) atoms to form MgO6 octahedra that share corners with three equivalent As(1)O4 tetrahedra, corners with three equivalent As(2)O4 tetrahedra,  an edgeedge with one Mg(1)O6 octahedra, and edges with two equivalent Fe(1)O5 trigonal bipyramids. Fe(1) is bonded to one O(1), one O(2), one O(5), one O(6), and one O(7) atom to form FeO5 trigonal bipyramids that share corners with two equivalent As(1)O4 tetrahedra, corners with three equivalent As(2)O4 tetrahedra, and edges with two equivalent Mg(1)O6 octahedra. There are two inequivalent As sites. In the first As site, As(1) is bonded to one O(2), one O(3), one O(4), and one O(6) atom to form AsO4 tetrahedra that share corners with three equivalent Mg(1)O6 octahedra,  a cornercorner with one As(2)O4 tetrahedra, and corners with two equivalent Fe(1)O5 trigonal bipyramids. The corner-sharing octahedral tilt angles range from 50-53°. In the second As site, As(2) is bonded to one O(1), one O(4), one O(5), and one O(7) atom to form AsO4 tetrahedra that share corners with three equivalent Mg(1)O6 octahedra,  a cornercorner with one As(1)O4 tetrahedra, and corners with three equivalent Fe(1)O5 trigonal bipyramids. The corner-sharing octahedral tilt angles range from 34-51°. There are seven inequivalent O sites. In the first O site, O(5) is bonded in a trigonal planar geometry to one Mg(1), one Fe(1), and one As(2) atom. In the second O site, O(6) is bonded in a distorted trigonal planar geometry to one Mg(1), one Fe(1), and one As(1) atom. In the third O site, O(7) is bonded in a distorted trigonal non-coplanar geometry to one Mg(1), one Fe(1), and one As(2) atom. In the fourth O site, O(1) is bonded in a distorted trigonal planar geometry to one Mg(1), one Fe(1), and one As(2) atom. In the fifth O site, O(2) is bonded in a bent 150 degrees geometry to one Fe(1) and one As(1) atom. In the sixth O site, O(3) is bonded in a trigonal planar geometry to two equivalent Mg(1) and one As(1) atom. In the seventh O site, O(4) is bonded in a bent 120 degrees geometry to one As(1) and one As(2) atom.
MgFeAs2O7 crystallizes in the monoclinic P2_1/c space group. Mg(1) is bonded to one O(1), one O(5), one O(6), one O(7), and two equivalent O(3) atoms to form MgO6 octahedra that share corners with three equivalent As(1)O4 tetrahedra, corners with three equivalent As(2)O4 tetrahedra,  an edgeedge with one Mg(1)O6 octahedra, and edges with two equivalent Fe(1)O5 trigonal bipyramids. The Mg(1)-O(1) bond length is 2.14 Å. The Mg(1)-O(5) bond length is 2.13 Å. The Mg(1)-O(6) bond length is 2.11 Å. The Mg(1)-O(7) bond length is 2.25 Å. There is one shorter (2.09 Å) and one longer (2.19 Å) Mg(1)-O(3) bond length. Fe(1) is bonded to one O(1), one O(2), one O(5), one O(6), and one O(7) atom to form FeO5 trigonal bipyramids that share corners with two equivalent As(1)O4 tetrahedra, corners with three equivalent As(2)O4 tetrahedra, and edges with two equivalent Mg(1)O6 octahedra. The Fe(1)-O(1) bond length is 2.12 Å. The Fe(1)-O(2) bond length is 1.99 Å. The Fe(1)-O(5) bond length is 2.07 Å. The Fe(1)-O(6) bond length is 2.16 Å. The Fe(1)-O(7) bond length is 2.14 Å. There are two inequivalent As sites. In the first As site, As(1) is bonded to one O(2), one O(3), one O(4), and one O(6) atom to form AsO4 tetrahedra that share corners with three equivalent Mg(1)O6 octahedra,  a cornercorner with one As(2)O4 tetrahedra, and corners with two equivalent Fe(1)O5 trigonal bipyramids. The corner-sharing octahedral tilt angles range from 50-53°. The As(1)-O(2) bond length is 1.67 Å. The As(1)-O(3) bond length is 1.71 Å. The As(1)-O(4) bond length is 1.79 Å. The As(1)-O(6) bond length is 1.70 Å. In the second As site, As(2) is bonded to one O(1), one O(4), one O(5), and one O(7) atom to form AsO4 tetrahedra that share corners with three equivalent Mg(1)O6 octahedra,  a cornercorner with one As(1)O4 tetrahedra, and corners with three equivalent Fe(1)O5 trigonal bipyramids. The corner-sharing octahedral tilt angles range from 34-51°. The As(2)-O(1) bond length is 1.72 Å. The As(2)-O(4) bond length is 1.78 Å. The As(2)-O(5) bond length is 1.71 Å. The As(2)-O(7) bond length is 1.71 Å. There are seven inequivalent O sites. In the first O site, O(5) is bonded in a trigonal planar geometry to one Mg(1), one Fe(1), and one As(2) atom. In the second O site, O(6) is bonded in a distorted trigonal planar geometry to one Mg(1), one Fe(1), and one As(1) atom. In the third O site, O(7) is bonded in a distorted trigonal non-coplanar geometry to one Mg(1), one Fe(1), and one As(2) atom. In the fourth O site, O(1) is bonded in a distorted trigonal planar geometry to one Mg(1), one Fe(1), and one As(2) atom. In the fifth O site, O(2) is bonded in a bent 150 degrees geometry to one Fe(1) and one As(1) atom. In the sixth O site, O(3) is bonded in a trigonal planar geometry to two equivalent Mg(1) and one As(1) atom. In the seventh O site, O(4) is bonded in a bent 120 degrees geometry to one As(1) and one As(2) atom.