MAC address port-security

Hello Everyone!

I would like to ask for help regarding whether it is possible to configure or create a script on a MikroTik device that works similarly to MAC address port-security on Cisco devices. I have tried several scripts, but without success. Has anyone managed to create something like this?

Thank you in advance for your help.