He had his deal with the League Two side Notts County cancelled by mutual consent earlier this month.
MacKenzie made more than 80 appearances for ths Stags between 2002 and 2004, and will be added to the squad for Tuesday night's league game against Rushden and Diamonds at Field Mill.
MacKenzie joins Mansfield
David Holdsworth, the Mansfield manager, hinted at a permanent deal for the midfielder.
"We would like to welcome Neil and I'm sure he will be a good addition to our squad," he told the Stags' official website.
"Neil will bring a lot of experience. He is a very talented footballer and his stay with us may be made more permanent over the next few days."