What if you made 3,4-methylenedioxyphenyl-2-isocyanato-propanone? That would be with a -NCO group on the middle carbon on the side chain.
When reducing an isocyanate, the N-methylamine should form (right?), in this case MDMA, this without having to use methylamine at all.
How would it be made? I don't know the best way, really. Either chloro- or bromosafrole would be reacted with potassium isocyanate (KNCO) in DMF or DMSO, or there may be a possibility that HNCO could be made by depolymerizing cyanuric acid by heating it to 330 deg C and then leading the gas through a solution of safrole, hoping that isocyanic acid is reactive enough to add across the double bond.
One problem is the formation of trialkyl isocyanurates when making alkyl isocyanates from KCNO, but is that a problem? What happens when a trialkyl isocyanurate is reduced? Is some strange triazine formed, or does it depolymerize in situ, forming the desired MDMA anyway?