The Mets opened a 10-game road trip by letting a two-run lead get away in the eighth but they quickly rebounded for three runs against Brian Wilson. New York won for the ninth time in 11 games.
Wilson gave up a one-out double to Carlos Beltran, who then stole third. Gary Sheffield drew a walk and Wright singled home Beltran to put the Mets in front.
Sheffield and Wright worked a double steal and both scored on Castro's single to right.
Despite giving up the tying runs in the eighth, Bobby Parnell (2-0) was credited with the win. Francisco Rodriguez threw only 10 pitches in the bottom of the ninth to get his 10th save.
2014: The Year in Music [PHOTOS]