The crystal structure of the superconductor MgC x Ni 3 is reported as a function of carbon concentration determined by powder neutron diffraction. The single-phase perovskite structure was found in only a narrow range of carbon content, 0.88<x<1.0. The superconducting transition temperature was found to decrease systematically with decreasing carbon concentration. The introduction of carbon vacancies has a significant effect on the positions of the Ni atoms. No evidence for long-range magnetic ordering was seen by neutron diffraction for carbon stoichiometries within the perovskite phase stability range.