The 25-year-old scored 15 goals in 54 appearances for the U's last season, but has not played a game this term.
The Stags say the deal contains an option to agree a permanent move.
"This is a young man who I first tried to sign when he was scoring goals in the Scottish Premier League for Dundee," manager Steve Evans told the club website.
Media playback is not supported on this device
Find all the latest football transfers on our dedicated page.
Mansfield Town have signed striker Kane Hemmings from League One club Oxford United on a season-long loan.