You may be interested in my setup that accepts ASCIIMathML, converts it to LaTeX, delivers it by KaTeX where possible and falls back to MathJax when necessary.
I created such a daisy-chained page that uses ASCIIMathML input with KaTeX rendering where possible, and it falls back to MathJax when KaTeX can't handle the expression. See
Here it is: http://www.intmath.com/cg5/asciimathml-katex-mathjax.php
Here's how it was done: http://www.intmath.com/blog/katex-with-asciimathml-input-and...