Also, directly converting TeX to MathML, even client-side, is much easier and faster than MathJax's many-to-many approach (I'm not criticising MathJax — given the constraints, they're doing the best possible job).[0][1][2] (See also the Ascii to MathML converter[3] that has already been mentioned in another comment.)
[0] http://fred-wang.github.io/MathUI2014/demos/7-web-component....
[1] https://github.com/fred-wang/MathUI2014/blob/master/demos/7-...