I have the same issue with HSM Express & I always have to wait for the latest version to be released which is usually about 2 to 3 months after I upgrade SolidWorks. I Understand that if I had the full version HSM Works I can download the latest beta version (with it's risks) & it will work. Not sure if Mastercam has a similar option.
That is a Mastercam question, not a SolidWorks question.
For our CAM software I always make sure our CAM software vendors have a version of software released that is compatible with the version of SolidWorks I want to roll out here at work. I am waiting on Esprit and CAMWorks to release a version that will work with SolidWorks 2017. (May already be compatible, just need to check with tech support for those two products).
That is the first step in the roll out process. Make sure all needed software is compatible with one another before installing.
Get with Mastercam tech support and ask them what version of Mastercam will work with Solidworks 2017.