Yes, in the firewall settings, you should allow for incoming connections for the Mirror to TV applications. To make this change, go to System Preferences:
Then select Security & Privacy, click on Firewall and click on the lock to make changes and select Firewall Options:
Do not select “Block all incoming connections”, because if you do this, your TV cannot reach your Mac to start screen mirroring. Next to the Mirror to TV app, “allow incoming connections” should be selected.