The Bluebirds had to come from behind to get the three points, securing them in the 92nd minute through a Craig Conway winner.
The result moves Cardiff closer to second-place Southampton in the Championship table, and MacKay believes it is nothing more than his side deserved.
"It was a well-deserved victory. The first 35 minutes was some of the best stuff we've played for a while. We created chances, had three one-on-ones, scored a fantastic goal and, although Marshy made the error, there was a calmness going into the second half," said the former Watford boss.
"We showed great mental toughness and character. We played well and I felt the goals would come.
"We were bright and alive. Craig set up one and scored another but both came from set-pieces which we took quickly. We worked hard for things today."
Cardiff's next test comes on Tuesday as they host Crystal Palace in the Carling Cup semi-final second leg.