The 34-year-old had been without a club since leaving Fleetwood Town in September. He has also previously played for Sunderland, Preston, Burnley and Sheffield Wednesday and has one Scotland cap.
Buddies boss Jim Goodwin told the club website: “Just having someone with his experience around is great, and also the fact he can play in midfield and at left-back.
“People will be used to him playing in more advanced areas but he actually played a lot at League 1 in England with Fleetwood Town last year in the middle of the pitch.”