Frankie Montas of the Cincinnati Reds pitches during the first inning...

Frankie Montas of the Cincinnati Reds pitches during the first inning against the Yankees at Yankee Stadium on July 4. Credit: Jim McIsaac

One of the Mets’ biggest projects of the offseason — rebuilding the rotation — has commenced, and they are deploying a familiar strategy.

The Mets agreed to a two-year, $34 million contract with righthander Frankie Montas, pending a physical, a source confirmed to Newsday on Sunday night.

Montas is due to receive $17 million per season in 2025 and 2026. He also has an opt-out clause after the first season, meaning he can forgo the second half of the contract if he would rather test free agency again next offseason. His deal was first reported by ESPN.

This is the largest contract awarded by the Mets in the year-plus that David Stearns has been president of baseball operations.

As the Mets await clarity on Juan Soto — their top target and the best free agent available this offseason — they were able to check off another item on their needs list by bringing in Montas, who like Soto is represented by Scott Boras.

Montas, who will be 32 next season, is a veteran of parts of nine major-league seasons with the White Sox, Athletics, Yankees, Reds and Brewers. He split 2024 between those last two, posting a 4.84 ERA and 1.37 WHIP in 30 starts. That represented a rebound of sorts after right shoulder surgery limited him to one game for the Yankees in 2023.

Montas’ numbers improved somewhat after a late July trade to Milwaukee, Stearns’ former club and an organization with a history of maximizing pitchers’ production. Among the improvements: a strikeout rate that jumped from 19% to 29%. But he still was barely good enough to crack a thin playoff rotation. He allowed three runs (one earned) and six hits in 3 2/3 innings against the Mets in Game 2 of their NL Wild Card Series.

Adding Montas is similar to what the Mets did last winter with Luis Severino (one year, $13 million) and especially Sean Manaea (two years, $28 million and an opt-out that he exercised to become a free agent again): a short-term, medium-money deal with a starting pitcher who they believe can be better than he has shown in recent years.

That strategy worked out great for the Mets the first time, with both of those signings turning into stalwarts who helped them qualify for the postseason. Manaea in particular became a leader of the rotation during what he described as “definitely the best [year] of my career.”

With Severino, Manaea and Jose Quintana now free agents, Stearns said last month that the Mets want to bring in “multiple” starters to fortify the rotation. Among their internal options: Kodai Senga, David Peterson, Tylor Megill, Paul Blackburn.

“How many multiples, I don’t know yet,” Stearns said. “We talked about this last offseason too: You can build pitching staffs in very different ways. And you can do it via adding starting pitching and going for length at the front end of games. We can structure our bullpen a little bit differently next year where you’ve got more multiple-inning options that can eat up innings.

“But certainly we need to find some innings. And a part of that is going to be adding to the starting rotation.”

The Mets could stand to add a true ace, but Stearns downplayed the importance of a brand-name No. 1 pitcher. The best starters available on the free-agent market are Corbin Burnes (another Boras client) and Max Fried.

“The way we built our rotation last offseason was successful,” Stearns said. “We’re seeking to build another successful rotation, however that occurs. And you can do it in a variety of different ways. So I don’t feel beholden to doing it in any particular one way.”

Although he once was a top prospect and had a couple of very good years with the Athletics, the most recent version of Montas is more of a Quintana type — a stabilizing presence and back-of-the-rotation innings-eater. The Mets will lean on pitching coach Jeremy Hefner and new assistant pitching coach Desi Druschel to try to turn him into more. Montas and Druschel worked together with the Yankees in 2022-23.