Mesh Network with MQTT server

Hello InfluxData Community! I hope all are well:

If I understand the concept of a mesh network correctly, it’s a way to wirelessly connect many Particle microcontrollers together, essentially extending or repeating the WiFi through each device in the chain of devices, so to speak. If this is so, then I need clarification on something.

The machine providing Internet (router) in my project is also an MQTT server. I need to send some sensor data to this local MQTT server. In order to do that, I need the IP address of the MQTT server (when using the MQTT community library). When the device is directly connected to the MQTT server, this is possible with the WiFi.gateway() command (Device OS API). My worry is, how will the other devices in the mesh network chain get the IP address of the MQTT server? Unfortunately, I cannot set the MQTT server (router) to have a static IP address, hence the use of the WiFi.gateway() command. I suppose I could share the IP address to the other devices through Particle’s Cloud communication features, but I suspect there is a better way. Please advise. Thank you.