First-team coach Locke has been in caretaker charge since McGlynn lost his job late last month following four consecutive defeats. That decision came despite McGlynn leading Hearts through financial troubles to the Scottish Communities League Cup final against St Mirren, with seven players aged 21 and under in his semi-final team.
Locke said: "He's the reason we are here. I feel a little bit embarrassed to be honest with you because I'm here getting my photographs taken and doing all the interviews and there is one man that has got us here. Hopefully we can do the business on Sunday because if we can manage to do it, certainly John McGlynn has played the most important part."
McGlynn had worked at Hearts for several years before leaving for Raith Rovers and the club remains close to his heart. And he has been on hand to offer advice to Locke, who like him is a lifelong Hearts fan.
"I still keep in regular touch, as I do with a lot of the people I have worked with," Locke said. "Certainly, he is very much in my thoughts. It's thanks to John McGlynn that we're here.
"It's unfortunate what happened in the last couple of weeks but myself Darren (Murray), Edgaras (Jankauskas) and Alan Combe have been taking the team for the last couple of games and it looks like that will be the case for the weekend, so we are just trying to prepare the team as best we can."
Locke admitted after Sunday's Edinburgh derby that he was not sure if he would still be in charge at Hampden, but the club have left him to prepare as normal amid reports that Peter Houston, who has held talks over the manager's job, will then come in.
"It was just the normal, the last three games have been the same," said Locke. "(Director of football) John Murray keeps us posted with everything that's going on at the club and it was just keep doing what we have been doing.
"We have taken charge of the last three league games. Obviously this is different with it being the cup but we are in charge on Sunday and we are all looking forward to it. There is still a lot of speculation regarding the managerial position.
"We are still obviously waiting but our sole focus this week is just to get the players focused for what is a huge game for the football club on Sunday."
- Sports & Recreation