This sounds very interesting and I think MQTT is great extension to the Meshtastic platform and will open up many possibilities. I really like the idea of the mini-apps, and clear APIs.
It is not really clear what roles (client, broker) are being played by the device and the phone, and phone as a gateway. I remember in other discussions your goal to make the device and phone both first-level “nodes”, and it sounds like there’s a dependency on that
1.6.4. Named attribute API
So in this case is there a full MQTT broker running on the device?
Fully agree that Matrix is the way to go, as open messaging. I understand that riot.im was re-branded as Element, so maybe clarify where we are referring to the client (Element) or the protocol (Matrix?).