Soyuz can auto-detect your 3D printer using Bonjour, also known as zeroconf. An install of Mainsail supports zeroconf, but it isn't enabled out of the box and requires a single-line configuration change.
To enable zeroconf in Mainsail, locate your moonraker.conf file and add a single entry:
[zeroconf]This is sufficient to enable zeroconf support, you don't need any additional configuration after this single line.