The 24-year-old joined Gillingham on loan in July, but his family failed to settle and he has returned to Brunton Park, where he scored four goals in 16 appearances last season.
"He was one of my main targets," boss Steven Pressley told the club website.
"We're delighted we've got it over the line. He's a really exciting player."
Thomas also spent time on loan with Notts County in League Two last season, scoring once in 29 appearances.
Need a VPN? Or seeking to switch? Then support Tribal Football by clicking here to sign up with our official partners NordVPN. Not only will you receive the best VPN experience, but also great discounts by signing up via Tribal Football. Thanks for your support!