Vargas tied for the major-league lead with 18 wins in 2017 when he made the first All-Star appearance of his 12-year career. He faded in the second half, however, and the 35-year-old lefty had been among more than 85 free agents seeking a job as spring training opened this week.
Another person familiar with the contract said it includes an $8 million club option for 2020 with a $2 million buyout, and Vargas can earn up to $1.5 million each year in performance bonuses.
Coming off a 70-92 season that followed consecutive playoff appearances, NY also signed reliever Anthony Swarzak to a $14 million, two-year contract in December.
Vargas underwent Tommy John surgery in 2015 after suffering a torn UCL in his left elbow.
Drake gives away almost $1M to Miami residents in 'God's Plan' video
After teasing it for weeks via his Instagram , Drake has finally unveiled the video for his latest track, 'God's Plan '. If that seems like a bold claim, it's because of a tidbit revealed at the beginning of the Karena Evans-directed video.
Having just turned 35 on February 2, Vargas hasn't seen many suitors come around this winter despite coming off the best season of his career. Team officials are also comfortable with Vargas because of his link to the organization: He pitched for the Mets in 2007 and was part of the trade with the Mariners for reliever J.J. Putz.
Vargas signed a four-year contract with the Royals ahead of the 2014 season, and he made three postseason starts that year during Kansas City's run to the World Series.
That changed last season with the Kansas City Royals. His previous best season came five years ago, when he went 14-11 with a 3.85 ERA in 33 starts for Seattle. Before the break, he was 12-3 with a 2.62 ERA.
The Royals did not extend a qualifying offer to Vargas after the 2017 season so they will not receive any compensation for Vargas signing with the Mets. Vargas, who had a 4.16 ERA, was the first Royals pitcher to win 18 games since Kevin Appier in 1993.