BBC One aired the Saturday night headline slot for the first time, featuring the festival's oldest ever top billed act.
McCartney, 80, was one of a number of performers who viewers flocked to iPlayer and BBC Sounds to stream, also including youngest ever headliner Billie Eilish, Kendrick Lamar's closing Sunday night headline slot, Crowded House, Diana Ross, Little Simz, Megan Thee Stallion, Noel Gallagher’s High Flying Birds and Sam Fender.
BBC's digital platforms did especially well from Glastonbury, with content streamed a record 34.1 million times on BBC iPlayer and played 2.3 million times on BBC Sounds.
On BBC iPlayer 23 million streams were live - the highest on record for a BBC programme brand.
Streams for the full coverage period of the festival increased by 116% on BBC iPlayer and 205% on BBC Sounds from 2019 when the festival was last held (up from 15.8m and 765,000 respectively).
Live coverage of the festival also drew millions to the BBC over the weekend - McCartney’s Saturday performance on BBC One had a peak audience of 3.9 million and an average audience of 2.7 million and Diana Ross’ Sunday teatime performance on BBC One had a peak audience of 3.8 million and an average audience of 3.1 million.
BBC director of music Lorna Clarke said: "The BBC provided the ultimate armchair experience of the world’s best-loved festival this weekend with a dedicated Glastonbury channel on BBC iPlayer, 6 Music’s All Day Glastonbury coverage, performances from the biggest artists on demand on BBC Sounds and over 35 hours of coverage across our TV channels.
"The party isn’t over yet, with over 90 sets and key tracks from the five filmed stages available to watch on BBC iPlayer – including Pyramid Stage performances in Ultra High Definition."
Watch: Billie Eilish receives Glastonbury chart boost