McCarthy, the former Ireland captain who managed the side from 1996-2002, takes over from Martin O'Neill who left along with assistant Roy Keane last week amid a run of six matches without victory and ahead of qualification for the Euro 2020 finals when Dublin will host four games.
In an unusual move, McCarthy will manage the team until the end of that campaign and then be replaced by Kenny, who has led Dundalk to four League of Ireland titles in five years and will become Ireland's Under-21 team manager in the meantime.
"I was never ever going to turn the chance down to return to this job," the former Sunderland and Wolverhampton Wanderers boss told a news conference. "We'll see if it's a good decision in two years' time but I'm looking forward to it."
McCarthy took Ireland to the last 16 of the 2002 World Cup, although the build-up was marred by a row with then Ireland captain Keane, who walked out after famously comparing the team's training-ground on the island of Saipan to a car park.
The episode has gone down in Irish folklore and was even depicted in a musical that compared the pair's dispute to a Shakespearean tragedy. McCarthy resigned later that year.
"I've got older, wiser, I think, with a bit more perspective on life not to fall out with everybody as quick as I did before," McCarthy said when asked how he had changed since.
Asked specifically about Saipan and his relationship with Keane, he joked that he could not recall the incident: "My memory's gone as well in the last 16 years."
Regardless of how well the 59-year-old former Millwall and Celtic centre back's second term goes, Kenny will take over in two years' time, having transformed Dundalk into a dominant force at home and made some progress in Europe, a rarity in the lowly Irish league.
Kenny, 47, who ran a meat-production business before moving into management full-time the year before the McCarthy/Keane bust up, had a brief stint in charge of Dunfermline, leading them to the Scottish Cup final.
Kenny, who declared this week that if given the choice, he would rather manage Ireland than Real Madrid or Barcelona, was due to be presented at a separate news conference on Monday.
The Football Association of Ireland also confirmed that Robbie Keane, the national team's record top scorer who retired in 2016, will join McCarthy's coaching staff.
"I kind of like the idea of a young coach with bright ideas - also the most capped, the top goal scorer," McCarthy said.
"All these guys that are coming through, he's their hero. I think it's going to be a real benefit to me."
(Reporting by Padraic Halpin and Conor Humphries Editing by Toby Davis)
(This story has not been edited by Devdiscourse staff and is auto-generated from a syndicated feed.)