Career
Heart of Midlothian
McGhee signed for Heart of Midlothian (Hearts) in 2007, having previously played for Claremont. In July 2012, he signed a three-year professional contract, tying him to the club until 2015. The following week he made his first start against Inverness Caledonian Thistle, in a 2–0 defeat.
In January 2015, McGhee signed a contract with Hearts that is due to run until the end of the 2016/17 season.
Ipswich Town made two offers of around £250,000 for McGhee in August 2015, but these were both rejected by Hearts. In January 2016 McGhee almost moved to Middlesbrough on loan but the move collapsed after paperwork failed to be completed in time.
McGhee earned caps at U15, U16 and U18 level before earning a call up to the Scotland U21 squad aged just 17 after some impressive performances for Hearts. After establishing himself as a regular at centre back alongside Stuart Findlay, he captained the Scotland U21 side for the first time in a friendly against Switzerland on 18 November 2014 which ended in a 1-1 draw.