The 34-year-old comes to Maryhill from Ross County where he played 21 Premiership games last season.
The full-back’s senior career began back in 2003 with Aberdeen, going on to play over 250 games for the Dons before joining Bristol City in 2012.
Stints at Rangers and Ross County followed before he signed with St. Johnstone where he spent three seasons between 2016 and 2019.
Foster was a League Cup winner with Ross County during the 15/16 season and also has a League One title winners medal to his name as he won promotion to the Championship with Rangers in 2014, featuring 27 times.