MIAMI — The Mets’ hot start didn’t just happen. The Salt and Pepper celebration didn’t just happen.

Beyond the improvements made on the field, relationships had to build and one of the most interesting developments on the team is the friendship that has formed between Todd Frazier and Yoenis Cespedes.

They are good for one another. It speaks volumes about how the Mets are together as a team.

“He is the one player,’’ Cespedes told The Post Monday night at Marlins Park before the Mets won their sixth straight, grinding out a 4-2 win over the Marlins, “that every team would love to have. His energy is unbelievable.’’

It is that Frazier energy that has helped Cespedes as well. Mickey Callaway’s lineup has clicked with Cespedes batting second, but that didn’t just happen.

A conversation between Frazier and Cespedes helped the slugger buy into batting second.

“I told him look at this lineup with you batting second,’’ Frazier said. “He was like, ‘All right, let’s do it.’ ’’

Frazier scored the first run of the night while Cespedes’ main contribution was throwing a runner out at second. He is battling the flu but wanted to play.

Callaway said he is thrilled with the way Cespedes and Frazier have bonded.

“Maybe Todd is one of the main reasons Ces has come out of his shell a little bit more this year,’’ Callaway said. “In turn that brings everybody else closer together a little bit more.’’

Salt and Pepper is more than a celebration for the hitters.

“Todd is one of those guys who makes everyone laugh,’’ Cespedes said. “I think for this team it is so great to have Frazier and I really enjoy being around him.’’

“He wants to win every night. It doesn’t matter who we are playing he wants to win so badly. He’s always pushing everybody to go get it. Get that victory. That’s great.’’

Six wins in a row now to go 8-1 on the season.

Frazier said Cespedes helped him get it together early.

“I was like 0-for-2 in like the fourth or fifth game,’’ Frazier said, “and he came up to me and said, ‘Papi, it’s the fifth game of the season. You got two more at-bats.’ I ended up hitting a double and it got us going. He kinda simmered me down because I’m a high-energy guy, I get mad at myself and yell. For him to say that to me, it meant a lot and it kinda shows the level of maturity that he is at. He’s a leader in his own way. I felt pretty good after that.

“He’s a guy I want to get to know better,’’ Frazier added. “I went to his ranch in Port St. Lucie, he’s a really nice dude, man and I’m just really glad that me and him are forming like a really good bond right now. I’m just glad he is on my side.’’

Callaway, a former Cleveland pitching coach, said Mike Napoli had a similar impact on the Indians.

“Without Mike Napoli we don’t go to the World Series [in 2016]. He had a real good year for us,” Callaway said. “He hit 34 home runs and drove in 101 but it was his leadership that did it for us.

“The energy on our bench has been outstanding during the games and that’s a credit to the players. You have to let players be themselves. If [Cespedes] wants to wear his hat backwards when he’s playing catch, he wears his hat backwards when he’s playing catch. As long as he runs the bases the right way, hustles, gets the ball in. You have to let people be themselves and when they are themselves, the best of them comes out.’’

Cespedes’ single knocked in the winning run in the 12th inning Sunday night in the 6-5 win over the Nationals.

“Everybody is pulling for everybody, it’s very selfless around here,’’ Callaway said.

That’s what a team needs to have besides talent to be successful.

Cespedes and Frazier are leading the way even when they are not at their best.