  The structural and magnetic interactions in stoichiometric (Mn$_3$SnC),
carbon deficient (Mn$_3$SnC$_{0.8}$) and tin deficient (Mn$_3$Sn$_{0.85}$C)
antiperovskite compounds are studied using x-ray absorption fine structure
spectroscopy and neutron diffraction. The study confirms the presence of local
structural distortions only around Mn atoms in the antiperovskite compounds
irrespective of their stoichiometry. The distortions in the Mn$_6$C octahedra
are such that only Mn atoms are displaced from their crystallographic positions
resulting in long and short Mn-Mn bonds. These long and short Mn-Mn bonds are
responsible for presence of ferromagnetic and antiferromagnetic moments on Mn
atoms. The C deficiency at the center of the octahedra increases the strain on
the Mn$_6$C octahedra and results in a wide variation of Mn-Mn bond distances
as a function of temperature and large hysteresis in magnetic properties. On
the other hand, Sn deficiency tends to relax strain by giving more space for
the octahedra to distort leading to temperature independent Mn-Mn bond
distances.
