Technically yes, you need a permit from the local authorities whenever you install any permanent additions to your house. Generator transfer switches are no exception.
However, if you hire a certified electrician for the installation, they will usually be able to sort out the permits on your behalf.