KANSAS CITY, Mo. — Brandon Nimmo is on the comeback trail.

The Mets outfielder went 1-for-3 with a walk and a strikeout as the designated hitter in a minor league rehab assignment for Single-A St. Lucie on Friday. It’s his first game action since mid-June, when he was rehabbing at Triple-A Syracuse.

Nimmo, who earlier had been diagnosed with a bulging disk in his neck, was then shut down for a month. In recent weeks he had been working out in Port St. Lucie. He has been on the injured list since May 21.

Before the Mets lost 4-1 to Royals at Kauffman Stadium on Friday, manager Mickey Callaway said it was unclear how many rehab games Nimmo would need before rejoining the team.

“We want him to be ready when he gets back,” Callaway said. “We don’t want him to be battling his ability to go up there and feel like he has a chance. We want him to put together good at-bats and we’ll lean on him for that type of information.”

Nimmo ideally would give the Mets an option for sharing center field with Juan Lagares.

“We have some guys down and to get some guys back would be a huge boost for us,” Callaway said. “We are kind of right-handed dominant at this point, to get another lefty would be big for us.”

Callaway was asked if he had communicated with Nimmo to boost the player’s spirits.

“Keep Nimmo’s spirits up?” Callaway said, referring to the player’s affable nature. “I talk to him to keep my spirits up. Just look up pictures on the internet to make myself smile.”

J.D. Davis was removed from the game in the eighth with right calf soreness after legging out an infield single. Davis said it’s discomfort he deals with on an occasional basis, and he doesn’t expect to miss playing time.

Aaron Altherr pinch-ran for Davis and remained in the game to play left field. Callaway has the option of using Davis as the DH for the next two games.

Drew Gagnon was optioned to Triple-A Syracuse a night after allowing four homers in 1 ²/₃ innings of relief against the Braves. The Mets selected Paul Sewald to take Gagnon’s spot in the bullpen. Tim Peterson was designated for assignment to clear space on the 40-man roster.

Billy Hamilton, who was designated for assignment Friday by the Royals, is an outfielder the Mets could potentially consider for their roster. Hamilton hit only .211 in 93 games for the Royals, but is still considered a premier defensive player and baserunner who would be an upgrade over Aaron Altherr.