In the continued absence of Jordan Burrow, United caretaker manager Paul Green has moved to recruit 34-year-old Hanson from league rivals Farsley Celtic.
Hanson has extensive EFL experience with the likes of Bradford City, Sheffield United, AFC Wimbledon and Grimsby Town.
Reflecting on Hanson's arrival, Green said: "James will be a great signing for us and brings a wealth of experience from playing at some great clubs.
"He's big, strong and powerful and is a proven goalscorer wherever he has been. I am really looking forward to working with him."
Hanson will wear squad number 30 for the Pilgrims.