McCarthy hadn't won away from Chase Field since May 18 before putting together a dominant performance in San Francisco on Saturday night, when the right-hander allowed one run and six hits in eight innings as the Diamondbacks beat the
He had been 0-4 with an 11.40 ERA in his previous four road starts but was able to throw strikes consistently against the Giants. McCarthy (4-9) struck out six and walked one. He threw 70 strikes in 99 pitches.
"For me, I have to have command, and if I am not using everything and using it to both sides of the plate, it becomes a much easier job for teams to hit me," McCarthy said.
McCarthy was on the 15-day disabled list from May 31-Aug. 2 with a right shoulder inflammation and had been struggling with his mechanics most of the season until recently.
"Once I was able to kind of fix what I needed to mechanically, everything has gone back into place the way I hoped it would," McCarthy said. "It's less thinking and just kind of being able to execute."
McCarthy has now walked three batters or fewer in 76 consecutive starts, the third-longest active streak in baseball.
Brad Ziegler pitched a scoreless ninth for his ninth save in 11 chances.
Matt Cain (8-9) gave up two runs and eight hits in 6 1/3 innings. He struck out three and walked four.
"I didn't make some pitches when I needed to, and it ended up costing us," Cain said.
Cain was activated from the 15-day disabled list prior to the game after missing 14 games with a contusion on his right forearm. Coming into the game, he had just one win in his last nine starts at home, going 1-5 with a 5.36 era over that stretch.
"Coming off the DL, it's been a while since he's pitched, and he did a good job," Giants manager Bruce Bochy said of Cain. "He went into the seventh and gave up only two runs. He made a couple mistakes, but he pitched well."
Paul Goldschmidt had three hits, including a triple.
"I just got some good pitches to hit," Goldschmidt said. "If you ask Cain, he probably would say they were a few mistakes."
The Diamondbacks broke a 1-1 tie in the fifth inning when Goldschmidt drove in Adam Eaton with a triple to deep right-center. Eaton had walked.
The Giants got to McCarthy in the third inning, when Brandon Crawford led off with a single and was bunted over to second by Cain. After a fielder's choice moved Crawford to third, he scored on Marco Scutaro's single.
With San Francisco leading 1-0, Arizona got the run back in the next frame when Gerardo Parra hit a two-out single to right field to drive in Goldschmidt, who had led off the inning with a single.
The Diamondbacks ended the first, third and eighth innings by getting thrown out on the bases.
In the first, Goldschmidt singled with two outs but was caught attempting to steal second. In the third, A.J. Pollock singled with one out but was doubled up on a flyout to Giants center fielder Angel Pagan. Pollock was stealing second on the play and didn't realize that the ball was a flyout; he was barely beaten by the throw back to first. In the eighth, Wil Nieves was thrown out at the plate trying to score from first on a double to left-center by Parra with two outs. Pagan hit the cutoff man, Crawford, who relayed the throw to Giants catcher Hector Sanchez for the tag at the plate.
"We were just trying to be aggressive on the base paths," Goldschmidt said. "That was an unbelievable throw to the plate by Crawford."
NOTES: Sunday's game features starting pitchers Wade Miley (9-10, 3.78) for Arizona versus Madison Bumgarner (11-9, 2.91) for San Francisco. ... McCarthy had not won on the road since May 18 in Miami and was 0-4 with an 11.40 era in his previous four road starts. ... The Diamondbacks' Chris Owings registered his first major league hit in the sixth, a single off Cain. Owings added a second single in the ninth inning and had his first stolen base later in the inning. ... Pagan had two throwing assists in the game.