calibre's Auto-add folder on the server only works if you have the calibre GUI running (headless).
I suggest exporting books to a temporary folder on the server (shared over NAS) and using a cron/systemd job backed by inotify to add all books added to that folder, and clean them up afterward.
calibre has many useful CLI tools

you probably want `calibredb restore_database` to fix the remote library, and `calibredb add --one-book-per-directory` to add books exported from calibre on your Mac.