Reversible control of the spin state of an organic molecule is significant for the development of molecular spintronic devices. Here, density functional theory calculations have been performed to study the adsorption of atomic nitrogen on a single manganese phthalocyanine (MnPc) molecule, three-layered MnPc, and MnPc on an Fe(100) surface. For all three cases, the N atom strongly adsorbs on the top of the Mn atom and induces a significant variation of the geometric, electronic and magnetic properties. After N adsorption, an energy gap appears and the electronic states become unpolarized. Different functionals including three hybrid functions are used in these calculations, and all yield the switchable spin state.