Many towns will have their local code on the Internet.
You can search them for the Home Office/Business criteria/restrictions.
You may be able to work from a residential site within those regulations - or not.
Of course choosing a local real estate pro can help you save a lot of time.
(Not me, I'm on the Cape, but I can help you choose a local pro when you are ready.)
(Please note: when you choose an answer as a Best Answer, or at least give a thumbs up, it helps those who answer questions here.)