GMPCs work best one of two ways, in my experience; as a plot device, or as a magic item.
Plot device: use them to help get something organized, to grant social access somewhere they wouldn't have it, to gather together a group of intrepid wanderers and get the quest started (a Fixer, a Gandalf, a Professor Xavier). Then, they need to either step out of the spotlight, or die. They get the ball rolling, but then the story is about the rolling ball, not about them.
Magic item: They're the Decker no one wanted to play, the Rogue/trap-monkey no one wanted to play, the Cleric/healer-bot no one wanted to play. Make them as a walking MacGuffin who does their one trick, and then keep them hands off. Use them to do a lot of "aid another" actions, to patch up hurt folks, to reload crossbows, to distract opponents, even to escort other NPCs -- but not to attack, themselves, not to get the kill shot, cook up the big plan, or steal the limelight. Have them do their one good trick in order to move the plot forward for the rest of the group, and that's that.
Anything other than these two, and there's trouble on the horizon. The GM (and as such the GMNPC) knows everything the world has to throw at them and knows all the plots, so they shouldn't be a team leader in the long-term (because they'll either metagame and make all the right decisions, boring for the PCs, or they'll pointedly make all the wrong decisions, which is boring and dangerous for the PCs). The GMNPC shouldn't hog the spotlight, because it's not his fucking spotlight. The GMNPC shouldn't solve all the problems, because as the GM he's got all the solutions; he should advance the plot so that the PCs can solve problems, instead.