The 36-year-old has arrived from the Magpies, where he made 49 appearances since joining in 2011.
Boro boss Gary Smith was thrilled to add the experienced midfielder to his squad.
"I'm delighted to be able to add him to our squad," he told the club's official website.
"It's a really good addition. He has lots of experience and comes in at the right time.
"He's also an individual that has seen and done a lot in the game, and plenty of our guys can lean on him and learn from him because of that."
Mahon began his career with Wolves, before moving to Hereford and then Brentford.
He then made 215 appearances for Watford and captained the club in the promotion-winning campaign in 2006.
Spells with QPR and Crystal Palace followed before Mahon was snapped up by the Magpies.
He is available to make his Boro debut as the club travel to Shrewsbury this weekend.