The 33-year-old midfielder, made available for transfer last summer, saw his contract expire at London Road at the end of June but he will remain at the club as they once again aim to return to the Championship following relegation.
McCann made a total of 43 appearances last term, scoring eight goals, but could not prevent Posh from slipping back into League One.
And the experienced Northern Ireland international will also now look to pass on some of his knowledge to the club's youngsters as he combines his playing role with coaching duties.
McCann tweeted: "Delighted to announce I have signed a 2 year player coach role at Peterborough Utd."
Chairman Darragh MacAnthony also spoke of his joy at McCann's new deal.
"Delighted to announce Grant has now signed a 2 year deal. Fantastic news for the club!," he added on twitter.