McCullers (2-1) bounced back from one of the worst performances of his career with a gem where he allowed one hit and struck out five in seven scoreless innings.
"He was masterful tonight," manager Dusty Baker said. "He was more aggressive with his fastball, which increased their swinging for the breaking ball."
The 26-year-old tied a career high by allowing eight runs in just 3 2/3 innings of a 14-7 loss at Arizona his last time out.
"It was just up to me not to blow it again," McCullers said. "We needed a win tonight. We needed to start the homestand on a big, positive note and we did that."
His only hit allowed Monday came when Donovan Solano extended his MLB-best hitting streak to 15 games with a grounder down the third base line that rolled just out of reach of Alex Bregman for a double with one out in the seventh.
"Wrong pitch," McCullers said. "That was on me shaking and not throwing the correct pitch in that situation."
The Astros got back in the win column a day after an ugly 7-2 loss to the Athletics that was marred by a benches-clearing fight that could lead to the suspension of hitting coach Alex Cintron. Cintron was yelling at Oakland's Ramon Laureano before the A's outfielder charged Houston's dugout, leading to the team's second such incident this season after the Astros also got into with the Dodgers.
San Francisco rookie starter Logan Webb (1-1) allowed four hits and five runs -- only two earned because of two errors -- in 3 1/3 innings.
"It's hard not to look at the line and feel discouraged," Giants manager Gabe Kapler said. "But at the same time, I think he can be proud of going through that lineup and not really giving up on much hard contact. I think we have better in us behind him that's for that's for sure."
Solano chased James on an RBI double with no outs in the ninth. Ryan Pressly retired the next two batters before the Giants cut it to 6-3 on a run-scoring single by Brandon Crawford. Slater hit an RBI single before Pressly retired pinch-hitter Evan Longoria to get his first save.
Bregman was hit in the shoulder by Solano's throw home while trying to score on Yuli Gurriel's grounder in the third. The ball bounced off Bregman, glanced off catcher Chadwick Tromp's mask and rolled away, allowing Bregman to score.
McCullers, who missed last season after Tommy John surgery, retired his first six batters before plunking Slater on the leg to start the third inning. He helped himself out with a nifty defensive play to end that inning when he ran to cover first base on a grounder hit by Mike Yastrzemski, made an off-balance catch and tagged Yastrzemski before falling to the dirt.
Astros: OF George Springer missed his fourth straight game Monday because of a strained right wrist. He visited a hand specialist on Monday in Houston and there was no additional damage. He remains day to day.
Solano's two hits Monday improved his average to .458, which ranks second in the majors behind Colorado's Charlie Blackmon (.484).
His 15-game hitting streak is a career best, and he's the first Giant to have a hitting streak of 15 games or more since Angel Pagan had a 19-game hitting streak in 2016.
Houston rookie Brandon Bielak (2-0, 0.87 ERA) will make his second career start when the series continues Tuesday night. Bielak, who made two relief appearances this season, allowed two hits in five scoreless innings in his first start on Thursday against Arizona but did not factor in the decision in Houston's 5-4 loss. Left-hander Tyler Anderson (0-1, 2.19) will start for San Francisco.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Minnesota Twins' torture: Breaking down their record MLB playoffs losing streak
With a Wild Card Series-opening loss to the Astros, Minnesota continued 16 years of futility. Here's a game-by-game recap of how the Twins got here.
Giolito flirts with perfect game, strikes out 8
Lucas Giolito was perfect for 6 2/3 innings in his playoff debut. He finished with eight strikeouts and allowed just two hits in seven innings as the White Sox downed the Athletics 4-1 in Game 1.
Astros win 4-1 in Game 1; Twins' record losing streak at 17
Jose Altuve drew a bases-loaded walk to force in the go-ahead run in the ninth inning for Houston after a two-out error by shortstop Jorge Polanco, and the Astros beat Minnesota 4-1 Tuesday to open their AL playoff series and stretch the Twins'...
Giolito dazzles, Abreu slugs White Sox past A's in opener
Lucas Giolito dazzled in his postseason debut, stymieing the Oakland Athletics through six perfect innings and sending the Chicago White Sox to a 4-1 victory in the opener of their best-of-three wild-card series Tuesday.
Twins implode in ninth, set record with 17th straight playoff loss
The Twins surrender three runs in the ninth inning and lose 4-1 to the Astros, setting an American pro sports record with their 17th consecutive postseason loss.
MLB Wild Card Tuesday Takeaways: Reaction to all four games as MLB playoffs begin
The MLB playoffs are underway! Here's what's going down in each of Tuesday's four American League matchups.