which kind of node have you used for MQTT? have a look at this Using Node-RED as a Local Fallback Server