McCarthy lined up at right-back against the Stags, and helped played his part in ensuring Gareth Ainsworth’s side picked up a fourth clean sheet in a row at Adams Park.
The only goal of the game came with just over 20 minutes remaining, as Michael Harriman curled home excellent after neat footwork in the build-up to creating the shooting opportunity, to lift the Chairboys to seventh.
In League 1, Jordan Turnbull and Swindon Town were beaten 4-1 by automatic promotion-chasing Wigan Athletic at the County Ground.
Will Grigg opened the scoring in the 15th minute for the Latics, before three goals straight after half time put the visitors in a four-goal lead.
Max Power, Grigg and Sam Morsy got the goals just after the break, before Nicky Ajose scored nothing more than a consolation for the Robins, who had Nathan Thompson sent off late on.
Elsewhere in League 1, Sam McQueen came off the bench as Southend United lost 4-1 to Rochdale, despite taking an early lead through Jack Payne.
Grant Holt, Joe Rafferty and Jamie Allen scored to put the hosts 3-1 up at Spotland, before McQueen was introduced just after the hour mark.
The Saints winger couldn’t spark a comeback for Phil Brown’s side, who conceded a fourth when Joe Bunney tapped home in stoppage time.
Lloyd Isgrove and Jack Stephens were both not involved for their respective loan clubs due to international commitments. Isgrove’s Barnsley drew 0-0 at home to Scunthorpe United, while Stephens’ Coventry lost 3-1 to Peterborough United.