The Scottish Cup winners found themselves under the cosh in the first half in Switzerland but stunned the hosts two minutes after the break when MacLean prodded home from eight yards.
Marco Schneuwly drew the Swiss Super League outfit level with 21 minutes remaining but it was another impressive European performance from the McDiarmid Park outfit.
Tommy Wright's team beat Norwegian big guns Rosenborg and FC Minsk away from home in last year's contest before crashing out on penalties to the Belarusians.
They will now be favourites to progress ahead of next week's Fair City return with Lucerne.
The visitors had to rely on the same squad that landed them their first major trophy with an historic 2-0 win over Dundee United at Celtic Park just two months ago.
While Nigel Hasselbaink, Paddy Cregg, Tim Clancy and Chris Iwelumo have all been allowed to leave, Wright has yet to make any reinforcements.
Injuries meant defender Steven Anderson and midfielder Gary McDonald did not even board the plane to Switzerland, and to further tie the manager's hands together, last season's 27-goal top scorer Stevie May was limited to a place on the substitutes' bench after failing to shake off a thigh strain.
That meant Wright had to go with MacLean as his loan striker but St Johnstone were comfortable in the opening stages.
There was little to see in the first quarter of an hour but the hosts soon stepped up the tempo as they threatened for the first time.
A 17th-minute corner from Adrian Winter was flighted towards full-back Jerome Thiesson but his header was off target.
Jahmir Hyka did better with the next delivery as he sent a fierce effort from the edge of the box towards Alan Mannus' goal. The Northern Irishman was on his toes, though, and he sprang to his left to beat the ball away.
Schneuwly - Lucerne's recent signing from Thun - nearly marked his move to the Swissporarena with a goal as he rattled Mannus' crossbar from 25 yards out.
The visitors, though, had some decent possession of their own and almost stunned Luzern after half an hour when Dave Mackay hooked a boot at David Wotherspoon's free-kick - but the skipper failed to beat home keeper David Zibung.
Brian Easton was next to save St Johnstone when he blocked on the line from a Remo Freuler effort, while Fraser Wright collected the game's first booking after clattering into Winter.
Wright's men were having to work hard amid temperatures of 32 degrees Celsius but survived with their clean sheet intact until the break.
Luzern would have been confident of eventually breaking their opponents down but within two minutes of the restart they were behind. They failed to clear a Saints corner and left MacLean unchecked as he got on the end of Weatherspoon's assist to prod home.
It would have been two moments later had Zibung not come to the rescue again after Mackay struck another decent effort.
It was a worrying situation for the Swiss but Hyka almost found an equaliser on 62 minutes before firing wide.
St Johnstone's luck did not last, though, and Schneuwly did find the net for Lucerne as he was allowed to turn in the box and fire inside Mannus' right-hand post.
Schneuwly and Dario Lezcano both had opportunities to give Lucerne a lead before the second leg but St Johnstone held firm.