Insight into live microbial biofilm microstructure and mechanical properties and their interactions with the underlying substrate can lead to the development of new remedial strategies and/or materials. Here we report mechanical properties of dental pathogenic Streptococcus mutans biofilms, grown on a polystyrene-coated plate of a shear rheometer in physiologically relevant conditions, precisely controlled in a custom built bioreactor. In situ measurements demonstrated the importance of microstructure and composition of extracellular polymeric substances on the biofilm modulus. The biofilms behave like a weak gel with storage moduli higher than loss moduli. The simple but robust experimental technique presented here can easily be extended to other biofilm-material systems.