The 24-year-old completed the deal in time to go into the squad for Saturday's game at Accrington.
Cooper, the son of ex-Scotland international Neale, was on Liverpool's books as a youngster.
He has also had spells at Ross County, Elgin and Falkirk before playing 12 games for St Mirren last season, scoring once.
Find all the latest football transfers on our dedicated page.
Cheltenham Town have signed former St Mirren midfielder Alex Cooper on a three-month contract.