Depends how far you're commuting, there's a reason road bikes differ from mt bikes. OF COURSE you can commute on a mt bike, but might not want to.
I inherited my son's Kona Blast, Marzocchi front fork. I equipped it with front and rear racks. Yes I could ride it all day on pavement and yes I could carry 50+lbs between four Ortlieb panniers on that bike but.......
The stiff aluminum hardtail frame but that back wheel close to the seat - a harsh ride in back. Those short chainstay made heel clearance on the rear panniers iffy.
The front fork has no lock out, yes you do lose energy pogoing the front shocks during normal riding on the street. The short wheelbase was relatively unstable and became worse when the bike was carrying a significant load.
The '95 rigid steel frame Specialized HardRock I'm on now suffers from none of the above deficiencies.
Mike