Scotland sit third on the Group I table, two points behind second-placed Czech Republic, with two matches remaining which will decided whether or not they take part in the continental championship next year.
A must-win clash with Liechtenstein on October 8 precedes a tough battle with the Spaniards three days later and Rangers number one McGregor knows it will be difficult no matter who Vicente del Bosque deploys.
"I think we're still in with a chance. We have given ourselves a mountain to climb and we need results to go our way, but we're definitely not going to give up on it,‚ÄĚ he said.
"We showed the last time against Spain (3-2 loss) that we can do something.
"After going 2-0 down we put up a good fighting performance and showed real character.
"If it does come down to that and we need to get something then all the boys will try their hardest.