I have commuted for more than 15 years on both types of bikes and I prefer the MTB. My longest commute was 8km one way so speed is not a factor. In fact I never felt I got a decent work out on my road bike and that's what started me on the MTB with Knobbies instead.
I prefer the rugged Urban assault feel of the flat bars and wider tires, to which I seldom have to worry about flats due to the thicker tires. Because of this, I don't have to worry about tires pressures and pumping tires as often. It seems the allowable pressure range can be ran lower with a MTB, knobbies or slicks.
Additionally, I commute year round, so when the snow flies, I swap the slicks for the knobbies for the 5 months of snow