McCarthy (1-3) earned his first win of the season in his ninth start after firing eight shutout frames in his previous outing -- a no-decision against the Phillies.
The right-hander allowed two walks and struck out five in the 100-pitch gem.
Gerardo Parra homered on the first pitch of the game to provide the only run for the D-backs, who reeled off a fourth straight win.
The Marlins' Tom Koehler (0-2) absorbed the hard-luck loss, surrendering one run on three hits over six innings.
Teacher apologizes for showing sexual image of herself in class
Dennis Rodman pledges to end trips to North Korea