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.
First-team coach Locke, speaking at the pre-match media conference at Hampden, said: "He's the reason we are here. I feel a little bit embarrassed to be honest with you because I'm here today 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."
- Sports & Recreation