McCarthy will make his debut later this month with an away match against The Gambia, followed by a home fixture against Gabon.
The Harambe Stars currently trail Group F leaders Ivory Coast by five points, with six matches remaining.
The top team from the group will secure a spot in the World Cup, while the four best runners-up will have a chance to qualify through a second-round playoff.
In 2027, Kenya will co-host the Africa Cup of Nations alongside Tanzania and Uganda, though they did not qualify for the 2025 tournament in Morocco.
McCarthy, introduced at a press conference in Nairobi, spent the last two seasons as a striker coach at Manchester United under manager Erik ten Hag.
Before his stint in England, McCarthy gained managerial experience at South African clubs Cape Town City and AmaZulu, with whom he finished second in the league in 2020/21 and qualified them to their maiden CAF inter-club tournament.
The 47-year-old former player earned 80 caps for Bafana, scoring in both the 1998 and 2002 World Cups, and remains the only South African to have won the UEFA Champions League with FC Porto in 2004.