I have been hacking around this for a while trying to expose MDS web application in SharePoint. Apparently, the trick to remove the non-functional UI elements is to use hosted=true query parameter as in
you can find more details on how to do it here