The Pirates are last in the National League in OPS from their right fielders, and Buck will provide a veteran backup to Russell Martin with Michael McKenry out for the season after undergoing surgery on his left knee.
Byrd is batting .285 with an .848 OPS and 52 extra-base hits in 425 at-bats.
Buck, who went from the Miami Marlins to the Toronto Blue Jays to the Mets last offseason, is batting .215/.285/.401 this season. He has hit Buck has 15 homers this year, nine of which came in April.
The Pirates, who also get cash in the deal, will send minor league infielder Dilson Herrera and a player to be named to the Mets.
A native of Colombia, Herrera, 19, has played 163 games at second and 59 at third in minors. He has a .751 OPS in the Class A Sally League.
The Pirates are seeking their first winning season and first playoff berth in 21 years.