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 (McGlynn) is 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.
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, who has taken four points from three SPL games in charge.
"(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."
While Locke was keen to stress McGlynn had played the key role in the run to Hampden, both men would acknowledge that the club might not be around had it not been for the supporters' commitment to the cause before Christmas.
Fans raised more than £1million in a share issue which helped the club pay a tax bill and avert a winding-up order.
"The way the fans have rallied round the club this season, especially to raise the money they have raised, is a fantastic achievement," Locke said.
"There are thousands of them coming through here on Sunday so hopefully we can give them the result we are all looking for."