The Bavarian club completed a 6-0 victory to move top of the Bundesliga after Borussia Dortmund had beaten Hertha Berlin 3-2 on Saturday.
James has had a difficult spell at Bayern this season, acting as a bit-part player in the early stages of the season before suffering knee ligament damage in November.
And despite enjoying a more regular starting role in recent weeks, speculation around the Colombia international's future has continued.
He is in the second year of a two-season loan deal from Real Madrid, and although Bayern have an option to buy the playmaker for €42 million (£36m/$48m) this summer, James reportedly does not want to continue his tenure at the club.
That speculation continues despite James insisting he did not want to cut his loan deal short last December: “If I have to go because of lacking play time, then I will. But I would like to stay because I really feel the love of the fans and the whole Bayern family.”
And Bayern boss Niko Kovac insisted there was still a place for the 27-year-old at Allianz Arena back in January: "I know he's a top player, I know what he can do," Kovac told reporters.
"He's shown that not just here but at other big clubs. I expect top performances from him, just like I do any other player.
"We finished the first half of the season strongly, and competition for places is fierce, as is always the case. Now it's down to him to show he deserves a place in the team again."
James' performance against Mainz should cement his place in the starting line-up for the time being, and another player to impress was January signing Alphonso Davies.
Davies became the second-youngest Bayern goalscorer ever at 18 years, four months and 15 days when he found the net in the 70th minute, beaten only by Roque Santa Cruz who scored at 18 years and 12 days.