What makes a cassette mountain bike vs. road bike?
Road typically has a smaller range.  A road bike will typically come with a short cage derailleur.  Where a mountain will typically come with a medium or long cage derailleur.   Yes the mount on the freehub is compatible.  It is about the range capacity of the derailleur.