Command line to find bluetooth device's MAC address [duplicate]

Execute the following command line in macOS:

system_profiler SPBluetoothDataType

The output will print details about the build-in Bluetooth device along with the MAC address. The output will also list the paired devices along with their MAC addresses.