The 54-year-old, who had spells in charge of English clubs Reading, Leicester, Wolves, Millwall and Brighton, has been out of management since leaving Aberdeen in December 2010.
McGhee, who has signed a two-and-a-half-year contract, takes charge of a Pirates side that is currently 18th in the table and succeeds Paul Buckle, who was sacked following a 2-0 defeat at Barnet at the start of the month.