I have followed the guide here to make the raspberry pi a Wi-Fi access point.
But how can I get MAC address of connected devices?
This command will list all connected devices on the interface
wlan0 with details including the MAC address:
sudo iw wlan0 station dump
This should display the Mac addresses and associated IP addresses.
ip neigh show dev wlan0