Seth Lugo (3-1) earned the win, allowing six hits, one walk and three runs, two earned, in six innings. In his career, he is 3-0 vs. the Marlins and 6-1 on the road, and the Mets have won 10 of his past 11 starts.
The Mets got scoreless relief pitching from Jerry Blevins, Josh Edgin and Addison Reed, with the latter picking up his 12th save of the year.
Rivera, who started in place of flu-ridden first baseman Lucas Duda, and Bruce combined for five hits as the Mets (36-42) won for the fifth time in their past six games. Rivera went 3-for-4 as the Mets passed the Marlins for third place in the NL East.
Miami (35-42) concluded a 5-5 homestand by losing two of three to New York. In all-time home games against the Mets, the Marlins trail the series 102-101.
Marlins starter Jose Urena (6-3), who had won five straight decisions, took the loss, allowing six hits and five runs, three earned, in six innings.
Urena got off to a poor start as the Mets scored twice in the first inning. Curtis Granderson hit a leadoff double to left-center and scored on a two-out single by Bruce, who hit an 0-2 fastball that caught too much of the plate.
Bruce, not known for his speed, scored on a double to the left-center gap by Rivera.
New York extended its lead to 5-0 in the third. Granderson got on base when a throw by Marlins shortstop JT Riddle pulled first baseman Justin Bour off the bag. After an infield hit by Yoenis Cespedes, Bruce hit an RBI double, and Rivera laced a run-scoring single before Jose Reyes contributed a sacrifice fly.
Giancarlo Stanton's 21st homer of the season, a solo blast in the fourth, ended Miami's scoreless streak at 13 innings, cutting the Mets' lead to 5-1.
Miami closed its deficit to 5-3 in the sixth. Martin Prado's RBI single scored Stanton from second, and Christian Yelich crossed the plate when Lugo bounced a wild pitch.
The Mets stretched their lead to 6-3 with a run in the seventh. Matt Reynolds, getting a rare start in place of third baseman Wilmer Flores, tripled to the right field corner and scored on a groundout by Granderson.
NOTES: Miami rested LF Marcell Ozuna, an All-Star candidate. ... The New York Yankees have contacted Miami about trading for 3B Martin Prado and/or 1B Justin Bour, according to USA Today. The Boston Red Sox are also interested in Prado. ... Mets RHP Jacob deGrom, who is 3-0 with a 0.72 ERA in his past three starts, will get the ball when New York opens a three-game series against the visiting Philadelphia Phillies on Friday. ... RHP Edinson Volquez, who has a 7.94 ERA in his past three starts, will start for the Marlins in the opener of a three-game series at Milwaukee on Friday. ... Marlins RHP Tom Koehler (shoulder) may come off the disabled list to start Saturday. In his past three rehab starts at Triple-A New Orleans, spanning 15 2/3 innings, he has 20 strikeouts and three walks, allowing just three runs.