MDMA is in a class of drugs called 'substituted amphetamines' which are a sub-class of 'substituted phenethylamines'. The chemical name for the drug ending in methamphetamine is not an indicator that it has the same effects as the drug methamphetamine. The following is from the 'phenethylamine' English language wikipedia entry as of 2023/01/14:
Many substituted phenethylamines are psychoactive drugs, which belong to a variety of different drug classes, including central nervous system stimulants (e.g., amphetamine), hallucinogens (e.g., 2,5-dimethoxy-4-methylamphetamine), entactogens (e.g., 3,4-methylenedioxyamphetamine), appetite suppressants (e.g. phentermine), nasal decongestants and bronchodilators (e.g., pseudoephedrine), antidepressants (e.g. bupropion), antiparkinson agents (e.g., selegiline), and vasopressors (e.g., ephedrine), among others. Many of these psychoactive compounds exert their pharmacological effects primarily by modulating monoamine neurotransmitter systems; however, there is no mechanism of action or biological target that is common to all members of this subclass.
Many substituted phenethylamines are psychoactive drugs, which belong to a variety of different drug classes, including central nervous system stimulants (e.g., amphetamine), hallucinogens (e.g., 2,5-dimethoxy-4-methylamphetamine), entactogens (e.g., 3,4-methylenedioxyamphetamine), appetite suppressants (e.g. phentermine), nasal decongestants and bronchodilators (e.g., pseudoephedrine), antidepressants (e.g. bupropion), antiparkinson agents (e.g., selegiline), and vasopressors (e.g., ephedrine), among others. Many of these psychoactive compounds exert their pharmacological effects primarily by modulating monoamine neurotransmitter systems; however, there is no mechanism of action or biological target that is common to all members of this subclass.