NEW YORK -- Madison Bumgarner and the Giants felt right at home during the first leg of their extended stay in the Big Apple.
Juan Perez went 3 for 3 with an RBI single in his hometown, and the World Series champions won for the eighth time in 11 games. After taking two of three from the Mets, the Giants won't even change hotels -- they remain in New York this weekend to play three interleague games at Yankee Stadium.
Scores of San Francisco fans filled an otherwise empty Citi Field all series, and the Giants received a loud ovation as they walked off following the final out.
"It's nice to have a good fan base like that," Bumgarner said. "Especially this far away, it makes it a lot of fun when they care that much about us."
Bumgarner (13-9) has gone 19 straight starts without yielding more than three earned runs, the longest streak by a San Francisco pitcher since Tim Lincecum's 19 in a row from 2007-08. The previous Giants hurler to do it during one season was Ed Whitson in 1980, according to STATS.
Niese (7-8) threw seven solid innings for the Mets, who rallied for four runs in the ninth to win 5-4 on Wednesday night. They batted .184 while going 4-7 on their penultimate homestand.
"I established all of my pitches, threw them all for strikes, got my cutter working on both sides of the plate," Niese said.
With a runner on second, Javier Lopez retired pinch-hitters Lucas Duda and Anthony Recker for his first save since Sept. 11 last year. Recker struck out to end a crisp game that took 2 hours, 37 minutes.
Giants closer Sergio Romo, who had a blown save Wednesday, was rested after throwing 50 pitches over the previous two days.
Bumgarner caught a potentially painful break in the sixth.
With runners at the corners, Wilmer Flores hit a sharp grounder that appeared headed up the middle for a tying single. But the ball smacked off Bumgarner's left shin and pinballed right to first baseman Buster Posey for the third out.
"Felt a lot better when we got him out," Bumgarner said.
Bumgarner walked back to the dugout with no problem, then retired Eric Young Jr. with two on to end the seventh after a visit from pitching coach Dave Righetti.
Following his 13th career game with double-digit strikeouts, Bumgarner needs one more K to reach 200 in a season for the first time. The All-Star left-hander surpassed 200 innings for the third consecutive year.
"Feels good. I mean, that's what all starters are trying to do, really," Bumgarner said. "That's the main concern for me really is the innings, trying to get to 200 every year. So I've kind of been keeping an eye on it here the last month or so."
Jean Machi pitched a perfect eighth.
San Francisco scored twice in the fourth after Hector Sanchez hit a one-out double. Joaquin Arias blooped a single and Perez, who went to high school in New York City, delivered an RBI single.
Perez also walked during a perfect day at the plate and set a career high for hits.
"It's like a dream come true, coming back home in front of my friends, family, people that watched me play when I was little," Perez said. "It's a moment that I would say I'll never forget."
Ehire Adrianza, making his first major-league start, beat out a double-play ball to drive in another run.
Perez was among the Giants rookies who found cowboy hats, boots and orange-and-black acoustic guitars waiting for them at their lockers after the game -- costumes for some good-natured hazing.
"Just trying to have some fun, end of the year," said Lopez, who refused to disclose the ringleaders.
Perez, however, figured there wasn't much need for him to dress up for dinner back home in the Bronx. He said he left about 10 tickets Thursday for family and friends, including his mother, wife, daughter and sister.
Perez said he'll have many more folks coming to the Yankees series -- including his father, who was unable to attend Thursday because he was working.
"That will be a crazy series for me, tickets-wise," the outfielder said.
Josh Satin had a leadoff double in the fourth for New York's first hit. He scored on Daniel Murphy's single, but Bumgarner avoided further damage with the help of some fine defense by Arias at third.
Giants 3B Pablo Sandoval was rested. ... Posey went 0 for 4 and is 1 for 21 on the road trip. ... Lincecum (10-13, 4.40 ERA) faces Yankees LHP CC Sabathia (13-13, 4.90) in a matchup of former Cy Young Award winners Friday night. ... New York begins its final road trip Friday night in Philadelphia. All-Star 3B David Wright is expected back after missing seven weeks with a strained right hamstring.