How to add a contact automatically to Mautic when they register on my App

Sure you can do it via the API:

https://developer.mautic.org/#create-contact

I wrote it a bit more in detail in this thread: Update the segment and create a contact from the script - #3 by dirk_s

But if you use a mobile App - is there a server side part as well? I ask, because otherwise you would need to include the API key in the mobile App, which may not be the best idea in regards to security.