WASHINGTON — Senator Mitch McConnell took a sarcastic shot on Friday at Stephen K. Bannon, telling reporters at an end-of-the-year news conference that Mr. Bannon’s “political genius” had cost the party a Senate seat in Alabama.

As he looked to the new year, on the heels of this week’s passage of a landmark tax overhaul that Mr. Trump signed into law on Friday, Mr. McConnell, Republican of Kentucky and the majority leader, used most of the news conference to revisit what he called the “extraordinary” accomplishments of this year, and to sketch the broad outlines of his legislative agenda for early 2018.

He said he hoped that Democrats and Republicans would unite around an immigration bill that would protect young undocumented immigrants from deportation.

But Mr. McConnell also turned to politics. He will have to contend next year with midterm elections — and that means contending with Mr. Bannon, President Trump’s former chief strategist and a fiery populist who is working to elect Republicans in the mold of Mr. Trump by waging primary election challenges against some incumbent Republican senators or candidates backed by Mr. McConnell.