Edin Dzeko gave the visitors the lead before a goal from Aron Gunarsson and a Fraizer Campbell double put Cardiff 3-1 up.
Alvaro Negredo's late goal made for a nervy finish but Cardiff held on, leaving Mackay delighted after his club's first home game in the top flight in 51 years.
| PELLEGRINI RUES SET-PIECE DEFENDING
|4/11||Cardiff are 4/11 with BetVictor to avoid relegation
"This was the first time that we've played at home in the Premier League, so it meant a lot to a lot of people.
"I'm very proud of a lot of people at the club; obviously the players but also the fans who made the atmosphere unbelievable today."
Mackay went on to implore his fans to show more of the same as the season wears on.
"I looked at [assistant manager] David Kerslake at kick off and we thought, 'wow'," he said.
"The sort of passion that was shown by our fans today is something that will be important for us going forward."
Mackay was also full of praise for striker Campbell, whose two headers set Cardiff on their way to victory.
"I thought he gave their whole back four problems today," he said. "He's someone that I was delighted to get - when we got him from Sunderland I thought it was an incredible bit of business on our behalf.
"He needed to get fitter; he needed to get sharper and he needed belief again and that's what we gave him.
"He worked hard over the summer and I think he can force his way into the England squad again if he keeps playing like that against top opposition."