It would certainly be possible to get that working locally, though it would also be easier to have it route through the Internet.
If you wanted to go the local approach, I would suggest looking at the open source gateway that one of our community members wrote. It hasn't been explicitly tested on Mac, but it is node and the underlying library works on Mac I am pretty sure, so it should work. You can see it here: https://github.com/mumblepins/bluz-gateway
That could be modified pretty easily to handle our local communication protocol and then you would have a local server on the Mac that bluz would talk to which could trigger your software. Not sure if you are comfortable with node/JS, but that would be the way to do it.
If you wanted to go through the Internet, that would involve less programming, but would require an Internet connection and a gateway.
Either would work and the choice is certainly up to you.