DENVER — Marcus Stroman is peaking just as the Mets need an all-around Herculean effort to keep their razor-thin postseason chances alive.

After a rough month-plus to begin his Mets career, the right-hander finally seems worthy of the hype that accompanied his arrival from Toronto at the trade deadline.

On Tuesday he posted a second straight superb start, carrying the Mets to a 6-1 victory over the Rockies at Coors Field. The win, coupled with the Cubs’ loss to the Reds, sliced the Mets’ deficit for the NL’s second wild card to four games with 11 remaining. The Cubs and Brewers are now tied for the lead in the second wild card.

Stroman fired seven shutout innings in which he surrendered four hits and one walk with seven strikeouts to surpass his outing against the Diamondbacks last Thursday. In that start he allowed one earned run over 6 ¹/₃ innings.

“I just feel like I’ve made adjustments over the past two weeks, kind of changed my mechanics, my delivery a bit, and I feel like it’s paying off,” Stroman said. “I compete. I battle, regardless.

“Their lineup is incredible. You really have to keep an emphasis on keeping the ball down, especially in this ballpark, and I feel like I did.”

Stroman’s dominant outing followed a clunker by Steven Matz in which the left-hander surrendered six runs in the fourth inning. Stroman became only the third pitcher in Mets history to throw seven scoreless innings at Coors Field. Mike Pelfrey was the last to accomplish the feat for the Mets, in 2010.

“How [Stroman] works and the things he does in between starts instills all of that confidence he exudes every day,” manager Mickey Callaway said.

Amed Rosario, Brandon Nimmo and Pete Alonso all homered in the sixth inning, accounting for four runs that gave the Mets a 4-0 lead and knocked out starter Tim Melville. Alonso later blooped an RBI single in the eighth.

“From now going forward we have to win every single game that we play to be in a good spot,” Rosario said through an interpreter.

Alonso’s blast — a 467-foot rocket to center field — was his 48th of the season, moving him within four of tying Aaron Judge’s rookie record set in 2017. Alonso had delivered two hits the previous night to snap an 0-for-21 skid that was his longest of the season.

And Nimmo homered for the second straight night to continue his torrid play since returning from the injured list two weeks ago. Nimmo entered play with an 1.120 OPS over that stretch.

In August there was still a question whether Nimmo would return from the cervical bulging disk that cost him 2½ months with the Mets, but he’s now relieved to have cleared a mental hurdle in showing that he still can contribute.

“There is no question about it,” Nimmo said before the game. “To be able to come back and help as soon as I did and keep having good at-bats. Not every one of them is working out, but I feel I am having good at-bats and being a tough out. That is what I think I am supposed to do well is be a tough out, and I have been happy to do that the last [two weeks] and it has been reassuring for me mentally to know the neck is OK and that I can play the way that I want to.”

Rosario smashed a two-run homer in the sixth that started the outburst. The homer was Rosario’s 13th of the season, but first since Aug. 5, spanning 160 at-bats.

Melville entered with a 5.16 ERA, but was a handful early for the Mets. Three times in the initial five innings the right-hander put a runner on base only to escape with a double play.

But Stroman matched Melville during that stretch and then surpassed him.

“I can go out there and get hit around, but I’m not going to waver,” Stroman said. “I’m excited for my next start. I just have to keep this going.”

Purchase event tickets to The Amazin’ 1969 New York Mets: A World Championship for the Ages presented by The Paley Center for Media and New York Post. Enter promo code: NYPOST to unlock tickets only available for Post readers.