Structural and energy characteristics of the smallest magnetic endofullerene Fe@C20 have been calculated using the density functional theory approach. The ground state of Fe@C20 is found to be a septet state, and the magnetic moment of Fe@C20 is estimated to be 8 Bohr magnetons. Characteristics of an (8,8) carbon nanotube with a single Fe@C20 inside are studied in the framework of the semiempirical approach. The scheme of a magnetic nanorelay based on cantilevered nanotubes filled with magnetic endofullerenes is elaborated. The proposed nanorelay is turned on as a result of bending of nanotubes by a magnetic force. Operational characteristics of such a nanorelay based on (8,8) and (21,21) nanotubes fully filled with Fe@C20 are estimated and compared to the ones of a nanorelay made of a (21,21) nanotube fully filled with experimentally observed (Ho3N)@C80 with the magnetic moment of 21 Bohr magnetons. Room temperature operation of (21,21) nanotube based nanorelays is shown.