Bastardo went 4-1 with a 2.98 ERA and one save in 66 relief appearances with the Pittsburgh Pirates last season.
He was suspended 50 games by Major League Baseball in 2013 as part of the Biogenesis case.
The Mets also fortified their bullpen this offseason by re-signing Jerry Blevins, and fellow left-handed reliever Josh Edgin, who missed last season after having Tommy John surgery, is expected back by May.
Team officials also acknowledge remaining in contact with representatives of free-agent outfielder Yoenis Cespedes, although they expect him to sign a longer-term deal elsewhere.
Information from The Associated Press was used in this report.