McKay netted the opener from the penalty spot and took advantage of some slack play from the visitors to put Caley Thistle 3-1 up just after the break and take his tally for the season to 18 goals.
The former Northampton striker has now netted in seven consecutive matches and has seven goals in his last three games, topping the SPL scoring charts with 15 league strikes.
A long-range effort from Owain Tudur Jones and a solo strike from Andrew Shinnie also helped move Caley Thistle above Motherwell and take the club beyond the half-century mark in goals at the halfway point of their season.
Terry Butcher's side, who remain in both cups, have now scored 53 times in all competitions.
Dundee midfielder Nicky Riley cancelled out McKay's opener and there was little in the first half but the home side were in total control after the break.
The visitors made a bright start and Matt Lockwood tested Antonio Reguero's handling with a powerful long-range strike.
Colin Nish then had a great chance to put the visitors ahead when Gary Warren misjudged Gary Irvine's long ball and saw it bounce over his head, but the big striker lacked conviction when clean through and failed to beat Reguero with his weak shot.
Inverness burst into life just before the penalty, forcing Rab Douglas into two excellent saves. The goalkeeper first pushed Richie Foran's curling low shot from 20 yards on to his post and then threw himself to his left again to stop McKay's header after David Raven had returned the ball.
But Declan Gallagher barged McKay as the pair chased the loose ball along the by-line and referee Kevin Clancy pointed to the spot despite strong protests from the visitors. The Northern Ireland international sent Douglas the wrong way to open the scoring.
Irvine blocked Shinnie's volley as Inverness looked to press home their advantage but the hosts were exposed in the 19th minute when Jim McAlister switched play from left to right as Riley ran forward in yards of space.
The midfielder did well to get the pass under control but still faced a tricky finish and fired the ball in off the far post from 15 yards.
More smart play from Riley soon allowed John Baird a shooting chance from the right edge of the box and he struck a fierce effort that Reguero pushed over the bar.
But Inverness went back in front in the 24th minute with a goal out of the blue.
Dundee had bodies behind the ball when Tudur Jones received a pass 25 yards out but the Welsh midfielder was allowed time to shoot and his powerful effort fizzed off the wet surface and evaded the reach of Douglas.
Dundee pushed for an equaliser without carving a clear chance and they shot themselves in the foot within three minutes of the restart when Iain Davidson's short backpass sent McKay clear.
Douglas came off his line and foiled the striker's attempt to go round him but the striker swung his leg at the ball as he lay on the ground and steered it into the net.
Inverness continued to create chances throughout the second half.
Aaron Doran lofted the ball beyond the far top corner after a one-two with Tudur Jones and Foran blazed over from a good position following Shinnie's cutback.
Douglas pushed Shinnie's shot wide after Tudur Jones had played him through but the midfielder netted his 10th goal of the season in the 70th minute.
Shinnie collected the ball just inside the box wide on the left and jinked in-between Riley and Kyle Benedictus before curling the ball inside the far corner.
Douglas saved from Ross Draper in the latter stages after another sweeping move.