Here's a (hacky) demo of MPC using MuJoCo in the browser: https://klowrey.github.io/mujoco_wasm/
I hacked it using MPPI and it only works on the cartpole model so as to not have to dwell in Javascript too long; just click the 'MPPI Controller' button and you can perturb the model and see it recover.