CHICAGO — A field marshal was necessary Wednesday night to direct the small army Matt Harvey put on the bases.

In only 3 ¹/₃ innings of work at Wrigley Field, the beleaguered right-hander twice loaded the bases and was probably fortunate to allow only five earned runs in the Mets’ 17-5 loss to the Cubs.

Harvey, who allowed seven hits and four walks, was removed with it 2-2 in the fourth and watched Hansel Robles walk in a run before Willson Contreras delivered a two-run single.

So in three starts since returning from 2 ½ months on the disabled list with a stress injury to his right scapula, Harvey is 1-2 with a 12.19 ERA as team officials try to determine where he stands heading to 2018. Overall he is 5-5 with a 6.14 ERA in 16 starts this season after struggling last year, when he missed the second half following surgery for thoracic outlet syndrome.

“It’s kind of hard to take any positives out of the last two years,” Harvey said. “I am extremely frustrated. It’s hard going out there and not doing what I can to help this team win and it’s extremely frustrating.

“There is a lot of work going in that is not paying off, and it’s becoming very frustrating for me, but there is still three starts to go and you have to do everything you can to go out there to just be better.”

Included in the calculus from the team standpoint is whether Harvey, who is arbitration eligible, should be tendered a contract, coming off two straight seasons curtailed by injuries.

But a club source indicated it’s extremely likely Harvey — who stands to make at least $6 million next year — will be tendered a contract by the Mets.

On Wednesday he allowed the first three batters he faced to reach base and allowed two runs in the inning on consecutive RBI ground outs. In the third he caught a break when Ian Happ was thrown out at third on Jason Heyward’s single to end the inning before Contreras touched the plate.

see also

But Harvey was finished after walking Kris Bryant to load the bases in the fourth. Javier Baez and Ben Zobrist had each singled earlier in the inning.

Noah Syndergaard was scheduled to play catch before the game and could move to a bullpen mound this weekend. The right-hander’s rehab has decelerated in recent days because of soreness following his last minor league start.

Erik Goeddel was prescribed medication in New York for dizziness and blurred vision and cleared for limited baseball activity, according to a medical update released by the team.

T.J. Rivera will undergo Tommy John surgery on his right elbow Thursday. The surgery will be performed by Dr. James Andrews in Gulf Breeze, Fla.

The Mets are expected to have faced four straight lefty starters (Jose Quintana, Jon Lester, Mike Montgomery and Sean Newcomb) by the time Friday’s game concludes. It’s the first time the Mets will have faced four straight lefty starters since May 1-5, 2012, according to the Elias Sports Bureau.