Harry Styles has supposedly offered to “lend his musical opinion” to Meghan Trainor.

American songstress Meghan climbed international music charts with her single All About That Bass, released back in June.

Apparently Harry met her through mutual friends during the US leg of his band One Direction’s Where We Are Tour and the heartthrob is so impressed with Meghan’s music he agreed to write a song for her.

“They have a similar sense of humour and Harry was keen to lend her his musical opinion,” a source told British newspaper The Mirror.

It is unknown whether the alleged track for Meghan will see Harry appear as a guest vocalist.

But it’s claimed the pair deeply respect each other’s musical prowess, so a collaboration could be possible in the future.

“He’s got a great ear and she was keen to hear about what Harry had to say. They also have good chemistry and get on really well,” the insider revealed.

In an interview published by USA Today last week, Meghan spoke of how much she respects the One Direction star.

She claimed they are getting on so well the pair have been communicating with each other frequently.

"I met Harry, and he's like a friend now," Meghan gushed. "We just texted each other a minute ago, and I'm still sweating over it."

Harry has been writing music for multiple people of late, including Irish band Kodaline.

One Direction’s wraps up their current tour in Miami, Florida on October 5.