McLeod, who is a proven Football League goal scorer, signed for the Magpies for a six-figure fee in the summer of 2015 after scoring 21 goals for Crawley in the 2014/15 season.
After being released by the Nottinghamshire club, McLeod has signed a contract with the Glovers until the end of the season.
The 31-year-old has scored over 150 career goals in more than 450 appearances since starting his career at Derby County and netted 10 times for John Sheridan’s side last season including three braces, finishing the campaign as the club’s second highest scorer.
The former England Under-21 international has featured for 12 clubs across the Football League including MK Dons, Charlton Athletic, Barnet and Portsmouth, being named League Two Player of the Year in 2007 as well as making the PFA Team of the Year on two occasions.
McLeod will be available for selection for Saturday’s Sky Bet League Two fixture at Doncaster Rovers and will wear the number 18 shirt.