The electronic structure, stability, electron-phonon coupling, and supercon
ductivity of the nonoxide perovskite MgCNi3 are studied using density funct
ional calculations. The band structure is dominated by a Ni d derived densi
ty of states peak just below the Fermi energy, which leads to a moderate St
oner enhancement, placing MgCNi3 in the range where spin fluctuations may n
oticeably affect transport, specific heat, and superconductivity, providing
a mechanism for reconciling various measures of the coupling lambda. Stron
g electron-phonon interactions are found for the octahedral rotation mode a
nd may exist for other bond angle bending modes. The Fermi surface contains
nearly canceling hole and electron sheets that give unusual behavior of tr
ansport quantities particularly the thermopower. The results are discussed
in relation to the superconductivity of MgCNi3.