There are some laws that are federal and a lot that are state. Then there is what you can get away with.....
To be legal on the road (Any road in the USA) you need to run DOT approved tires. Big knobbies are NOT approved tires! The tires that are legal on the street are pretty much worthless on a MX track. For short runs down a public road you can usually get away with running a dirt tire, unless you pass a local law officer who is just looking for a reason to pull you over. But the bottom line is that a decent off road tire will rubbed to nothing real quick running on asphalt.
Mirrors, turn signals, head light and tail/brake light is also a federally mandated requirement. Head and tail lights are not so easy to install, and if you don't have a lighting coil (most MX bikes don't come with one) it is a non trivial installation. Getting a proper brake light can be real bitch. Some states require that you have a battery so the headlight can operate without the engine running.
I didn't think that any state allows two strokes to become street legal.
A true MX bike has one purpose: racing. It is made as light as possible to serve that purpose. Uncessary weight, such as headlights, and the loss of horsepower to run the lighting coil is just not acceptable to a MX bike. Many racing organizations don't allow "accessory" appendages on the race bikes such as kickstands as they don't want to run the risk of it coming off and creating a track hazard.
If you want a dual sport bike there are plenty on the market. The Yamaha WR-450 is a great example of a "MX quality" bike that can be made street legal in many states. KTM makes street legal dual sport bikes that are quite good off road.
If you really want to ride your dirt bike to school, first get the proper license endorsment, then buy a bike that is street legal.
Rod