MgPH7(CO4)2 crystallizes in the monoclinic P2_1/c space group. Mg(1) is bonded to one O(1), one O(2), one O(3), one O(4), one O(5), and one O(6) atom to form MgO6 octahedra that share  a cornercorner with one C(1)PHCO tetrahedra and corners with two equivalent P(1)CO3 tetrahedra. The Mg(1)-O(1) bond length is 2.14 Å. The Mg(1)-O(2) bond length is 2.02 Å. The Mg(1)-O(3) bond length is 2.16 Å. The Mg(1)-O(4) bond length is 1.98 Å. The Mg(1)-O(5) bond length is 2.14 Å. The Mg(1)-O(6) bond length is 2.11 Å. There are two inequivalent C sites. In the first C site, C(1) is bonded to one C(2), one P(1), one H(6), and one O(5) atom to form distorted CPHCO tetrahedra that share  a cornercorner with one Mg(1)O6 octahedra. The corner-sharing octahedral tilt angles are 65°. The C(1)-C(2) bond length is 1.52 Å. The C(1)-P(1) bond length is 1.86 Å. The C(1)-H(6) bond length is 1.10 Å. The C(1)-O(5) bond length is 1.43 Å. In the second C site, C(2) is bonded in a distorted bent 120 degrees geometry to one C(1), one O(6), and one O(7) atom. The C(2)-O(6) bond length is 1.27 Å. The C(2)-O(7) bond length is 1.27 Å. P(1) is bonded to one C(1), one O(1), one O(4), and one O(8) atom to form PCO3 tetrahedra that share corners with two equivalent Mg(1)O6 octahedra. The corner-sharing octahedral tilt angles range from 40-52°. The P(1)-O(1) bond length is 1.54 Å. The P(1)-O(4) bond length is 1.50 Å. The P(1)-O(8) bond length is 1.57 Å. There are seven inequivalent H sites. In the first H site, H(1) is bonded in a single-bond geometry to one O(2) atom. The H(1)-O(2) bond length is 0.99 Å. In the second H site, H(2) is bonded in a single-bond geometry to one O(2) atom. The H(2)-O(2) bond length is 0.99 Å. In the third H site, H(3) is bonded in a single-bond geometry to one O(3) atom. The H(3)-O(3) bond length is 0.99 Å. In the fourth H site, H(4) is bonded in a distorted single-bond geometry to one O(1) and one O(3) atom. The H(4)-O(1) bond length is 1.68 Å. The H(4)-O(3) bond length is 1.00 Å. In the fifth H site, H(5) is bonded in a single-bond geometry to one O(5) atom. The H(5)-O(5) bond length is 1.00 Å. In the sixth H site, H(6) is bonded in a single-bond geometry to one C(1) atom. In the seventh H site, H(7) is bonded in a linear geometry to one O(7) and one O(8) atom. The H(7)-O(7) bond length is 1.48 Å. The H(7)-O(8) bond length is 1.04 Å. There are eight inequivalent O sites. In the first O site, O(1) is bonded in a 3-coordinate geometry to one Mg(1), one P(1), and one H(4) atom. In the second O site, O(2) is bonded in a distorted trigonal planar geometry to one Mg(1), one H(1), and one H(2) atom. In the third O site, O(3) is bonded in a distorted water-like geometry to one Mg(1), one H(3), and one H(4) atom. In the fourth O site, O(4) is bonded in a bent 150 degrees geometry to one Mg(1) and one P(1) atom. In the fifth O site, O(5) is bonded in a 3-coordinate geometry to one Mg(1), one C(1), and one H(5) atom. In the sixth O site, O(6) is bonded in a bent 120 degrees geometry to one Mg(1) and one C(2) atom. In the seventh O site, O(7) is bonded in a distorted bent 120 degrees geometry to one C(2) and one H(7) atom. In the eighth O site, O(8) is bonded in a bent 120 degrees geometry to one P(1) and one H(7) atom. Linkers: 2 [O]C(=O)[C@@H](O)P([O])(=O)O ,2 [O]C(=O)[C@H](O)P([O])(=O)O. Metal clusters: 4 [Mg]. The MOF has largest included sphere 1.34 A, density 2.21 g/cm3, surface area 2939.87 m2/g, accessible volume 0.05 cm3/g