Former England youth international Ainsworth started his career with Derby and has played for 12 clubs, mostly on loan, but has also been signed by Watford, Hereford, Huddersfield and Shrewsbury.
Ainsworth told MFCTV: "I am very pleased to be here; it's great to have joined a big club in Scotland.
"It is going to be something different for me but I am going to embrace it and do everything I can to make everyone happy.
"In particular, I want to repay the faith the manager has in me by bringing me in. I've heard nothing but good things so I just can't wait to get started."
McCall added: "It's an area we've been looking to fill for a while now.
"I got a call out the blue about a week ago to alert me to his situation and that he would be available.
"I know of him when my team at the time, Bradford, played against him whilst at Hereford and he was flying. He's been about, won a couple of promotions but has fallen out of favour at his parent club for whatever reason.
"Initially it will be a short-term loan but we'll see what happens. He has a good pedigree, is super quick and hopefully he will add a different dimension for us."
- Sports & Recreation