The 36-year-old downplayed his personal achievement, saying he was more focused on helping England win the final match of the series.
England wrapped up victory at the Oval on Tuesday, winning the final match of the series against the number one side in the world by 118 runs
Root described the feats of Cook, who made 147 in the second innings of a 118-run win, and Anderson, as "fairytale stuff".
Anderson, who now has 564 scalps, said he was happy his friend was on the field to witness his record.
India were dismissed for 345 on the fifth and final day, having been set a mammoth 464 for victory.
James Anderson removed Mohammad Shami to go past McGrath's tally of 563 wickets
The former England captain, about to become a father for the third time, said it was difficult to put his achievement into words
Cook made 147 and Joe Root, his successor as England captain, 125 as the hosts piled up 423 for eight declared in their second innings
The 33-year-old opener reached the landmark in unusual fashion when an overthrow from Jasprit Bumrah that went to the boundary
Chris Gayle, Colin Munro, Daren Sammy, Munaf Patel among overseas stars for LPL auction
Sarfaraz Ahmed, Shan Masood, Haris Sohail among captains named for National T20 Cup
Galle Gladiators sign Shahid Afridi as icon player for Lanka Premier League
PSL 5 to return on November 14; all matches in Lahore
PSL Schedule Live Streaming and PSL 5 Matches Details
National T20 Cup: Salman Butt declines to lead Central Punjab second XI
Dawid Malan dethrones Babar Azam to become top-ranked T20I batsman
PCB finalises three-year broadcast deal with PTV
PCB announces major salary hike for domestic cricketers in new pay structure
'Team was already on a losing streak when I took over' - Misbah on Pakistan's T20I decline