I know that ephedrine (ephedrine sulfate) is a stimulant. Is it legal in the usa?

Not alkaloids. The fda banned diet supplements containing alkaloids of Ephedrine (ephedrine sulfate) (found mainly in the stem of the ephedra sinica species) in 2004. Other names may be legal. The laws differ from state to state, and these regulate the activities of companies more than they do individuals. I am sure people buy these things from other countries, but they may still not be safe.