How much did you spend on the car? What year is the car? How many miles? What codes came up?
Unless he sold the car as salvage, it MUST pass the Massachusetts inspection. Since the Consumer Protection statute in Mass (General Laws Chapter 93A) calls for fee shifting (loser pays attorney fees) you may find an attorney to take this on a contingency basis. If you send a proper demand letter and the business fails to respond, you are entitled to treble (triple) damages PLUS attorney fees.
You can also go to masscourts.org and see if the dealer has ever been sued. You may be able to find the name of a lawyer who has successfully sued that lawyer before.
go to masscourts.org, select "search", District Court, your court, then type in the name of the dealer under business.