The league leaders trailed to first-half goals from Kieron Dyer and Sammy Ameobi but pulled one back through Ben Nugent in a stirring fightback after the break.
The Bluebirds created plenty of chances for a leveller but some profligate finishing saw them leave Teesside without a point.
"I felt we probably deserved a point on the basis of that second-half performance," said Mackay.
"We shot ourselves in the foot a bit and we gave away two goals which we would normally never concede and that made it very difficult.
"But we put in a spirited second half and we got one back and to be honest we had enough chances to have got the leveller."