MgCd2 crystallizes in the trigonal P-3m1 space group. Mg(1) is bonded to nine equivalent Mg(1) and three equivalent Cd(2) atoms to form distorted MgMg9Cd3 cuboctahedra that share corners with six equivalent Mg(1)Mg9Cd3 cuboctahedra, corners with six equivalent Cd(1)Cd12 cuboctahedra, corners with six equivalent Cd(2)Mg3Cd9 cuboctahedra, edges with six equivalent Cd(2)Mg3Cd9 cuboctahedra, edges with twelve equivalent Mg(1)Mg9Cd3 cuboctahedra,  a faceface with one Cd(1)Cd12 cuboctahedra, faces with seven equivalent Cd(2)Mg3Cd9 cuboctahedra, and faces with twelve equivalent Mg(1)Mg9Cd3 cuboctahedra. There are three inequivalent Cd sites. In the first Cd site, Cd(1) is bonded to three equivalent Cd(2) and nine Cd(1,1) atoms to form CdCd12 cuboctahedra that share corners with six equivalent Mg(1)Mg9Cd3 cuboctahedra; corners with six equivalent Cd(1)Cd12 cuboctahedra; corners with six equivalent Cd(2)Mg3Cd9 cuboctahedra; edges with six equivalent Cd(2)Mg3Cd9 cuboctahedra; edges with twelve Cd(1,1)Cd12 cuboctahedra;  a faceface with one Mg(1)Mg9Cd3 cuboctahedra; faces with seven equivalent Cd(2)Mg3Cd9 cuboctahedra; and faces with twelve Cd(1,1)Cd12 cuboctahedra. In the second Cd site, Cd(2) is bonded to three equivalent Mg(1), three equivalent Cd(1), and six equivalent Cd(2) atoms to form distorted CdMg3Cd9 cuboctahedra that share corners with six equivalent Mg(1)Mg9Cd3 cuboctahedra; corners with six equivalent Cd(1)Cd12 cuboctahedra; corners with six equivalent Cd(2)Mg3Cd9 cuboctahedra; edges with six equivalent Mg(1)Mg9Cd3 cuboctahedra; edges with six equivalent Cd(1)Cd12 cuboctahedra; edges with six equivalent Cd(2)Mg3Cd9 cuboctahedra; faces with six equivalent Cd(2)Mg3Cd9 cuboctahedra; faces with seven equivalent Mg(1)Mg9Cd3 cuboctahedra; and faces with seven Cd(1,1)Cd12 cuboctahedra. In the third Cd site, Cd(1) is bonded to three equivalent Cd(2) and nine Cd(1,1) atoms to form CdCd12 cuboctahedra that share corners with six equivalent Mg(1)Mg9Cd3 cuboctahedra; corners with six equivalent Cd(1)Cd12 cuboctahedra; corners with six equivalent Cd(2)Mg3Cd9 cuboctahedra; edges with six equivalent Cd(2)Mg3Cd9 cuboctahedra; edges with twelve Cd(1,1)Cd12 cuboctahedra;  a faceface with one Mg(1)Mg9Cd3 cuboctahedra; faces with seven equivalent Cd(2)Mg3Cd9 cuboctahedra; and faces with twelve Cd(1,1)Cd12 cuboctahedra.
MgCd2 crystallizes in the trigonal P-3m1 space group. Mg(1) is bonded to nine equivalent Mg(1) and three equivalent Cd(2) atoms to form distorted MgMg9Cd3 cuboctahedra that share corners with six equivalent Mg(1)Mg9Cd3 cuboctahedra, corners with six equivalent Cd(1)Cd12 cuboctahedra, corners with six equivalent Cd(2)Mg3Cd9 cuboctahedra, edges with six equivalent Cd(2)Mg3Cd9 cuboctahedra, edges with twelve equivalent Mg(1)Mg9Cd3 cuboctahedra,  a faceface with one Cd(1)Cd12 cuboctahedra, faces with seven equivalent Cd(2)Mg3Cd9 cuboctahedra, and faces with twelve equivalent Mg(1)Mg9Cd3 cuboctahedra. There are six shorter (3.12 Å) and three longer (3.26 Å) Mg(1)-Mg(1) bond lengths. All Mg(1)-Cd(2) bond lengths are 3.20 Å. There are three inequivalent Cd sites. In the first Cd site, Cd(1) is bonded to three equivalent Cd(2) and nine Cd(1,1) atoms to form CdCd12 cuboctahedra that share corners with six equivalent Mg(1)Mg9Cd3 cuboctahedra; corners with six equivalent Cd(1)Cd12 cuboctahedra; corners with six equivalent Cd(2)Mg3Cd9 cuboctahedra; edges with six equivalent Cd(2)Mg3Cd9 cuboctahedra; edges with twelve Cd(1,1)Cd12 cuboctahedra;  a faceface with one Mg(1)Mg9Cd3 cuboctahedra; faces with seven equivalent Cd(2)Mg3Cd9 cuboctahedra; and faces with twelve Cd(1,1)Cd12 cuboctahedra. All Cd(1)-Cd(2) bond lengths are 3.25 Å. There are six shorter (3.12 Å) and three longer (3.24 Å) Cd(1)-Cd(1,1) bond lengths. In the second Cd site, Cd(2) is bonded to three equivalent Mg(1), three equivalent Cd(1), and six equivalent Cd(2) atoms to form distorted CdMg3Cd9 cuboctahedra that share corners with six equivalent Mg(1)Mg9Cd3 cuboctahedra; corners with six equivalent Cd(1)Cd12 cuboctahedra; corners with six equivalent Cd(2)Mg3Cd9 cuboctahedra; edges with six equivalent Mg(1)Mg9Cd3 cuboctahedra; edges with six equivalent Cd(1)Cd12 cuboctahedra; edges with six equivalent Cd(2)Mg3Cd9 cuboctahedra; faces with six equivalent Cd(2)Mg3Cd9 cuboctahedra; faces with seven equivalent Mg(1)Mg9Cd3 cuboctahedra; and faces with seven Cd(1,1)Cd12 cuboctahedra. All Cd(2)-Cd(2) bond lengths are 3.12 Å. In the third Cd site, Cd(1) is bonded to three equivalent Cd(2) and nine Cd(1,1) atoms to form CdCd12 cuboctahedra that share corners with six equivalent Mg(1)Mg9Cd3 cuboctahedra; corners with six equivalent Cd(1)Cd12 cuboctahedra; corners with six equivalent Cd(2)Mg3Cd9 cuboctahedra; edges with six equivalent Cd(2)Mg3Cd9 cuboctahedra; edges with twelve Cd(1,1)Cd12 cuboctahedra;  a faceface with one Mg(1)Mg9Cd3 cuboctahedra; faces with seven equivalent Cd(2)Mg3Cd9 cuboctahedra; and faces with twelve Cd(1,1)Cd12 cuboctahedra. All Cd(1)-Cd(2) bond lengths are 3.25 Å. All Cd(1)-Cd(1) bond lengths are 3.12 Å.