The former Wolves boss took over at Portman Road in November 2012 when Ipswich were bottom of the division.
Having guided them to safety that season, McCarthy then led Ipswich to a top-nine finish in the last campaign, just four points shy of a play-off spot.
McCarthy, 55, expressed his joy at having penned a new deal, with assistant Terry Connor also agreeing a three-year extension.
"I'm delighted with it, more importantly I hope everyone else is delighted with it," he told the club's official website.
"I'm enjoying my time here and we are making progress. The challenge now is to continue to make progress.
"I'd like to think the players are enjoying being here, enjoy working with TC and myself. We've got a good group here and we need to push on now and build on the progression that we had last season."
Ipswich begin their league campaign with a home match against Fulham, who were relegated from the top flight last term.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.