The 29-year-old centre-back has joined in time to go straight into the squad for Tuesday night's match against Hartlepool at the Memorial Stadium.
Rovers manager Dave Penney was delighted to have captured the defender, and told the club's official website: "David McCracken has leadership qualities and experience gained from his time at Wycombe and MK Dons.
"He is just the type of player we need to come in and help the lads we already have here."
The former Scottish Under-21 player started his career in the Scottish Premier League with Dundee before moving to England and helping Wycombe gain promotion to League One.
He then spent two seasons at MK Dons before moving to Brentford in 2010.