The Pirates took the lead though David Clarkson's spot-kick after Peter Cavanagh's trip on the same player.
Goals from Andrew Tutte and Bobby Grant turned the game on its head before Gary Kenneth and substitute Eliot Richards saw red in the second half but McGhee insisted it wasn't all bad news.
"We have to take more of our chances and defend better set-pieces better, but I think we're working hard enough," he said. "There was a lot of spirit put into the performance, we have just got to keep doing that and we'll be okay.
"We lost this game but there were a lot of good individual performances.
"We were horribly indisciplined for the two sendings off, and while losing the game was the worst thing, having the two players sent off in such circumstances was very disappointing."