There is no built in functionality for this outside of the Hotspot system (the servlets themselves populate the variables).
You - usually - can’t do it anywhere but the router itself because MAC addresses get rewritten by layer 3 hops. I guess it would be possible to put a web server on the same broadcast domain as the clients, and to configure some connections to redirect to the local router web proxy, and to configure the web proxy to deny the proxy action with a redirect to the web server. If that web server then ran some software that was able to display the MAC address of the client - can’t think of any off the top of my head, but it might exist - you could show that information to the client.