In MDMA.HCl only the H+ from the HCl attaches to the MDMA molecule, bonding to the nitrogen and making the latter positively charged. The negatively charged Cl- which is then "left over" does not covalently bond to anything, it just hangs around nearby (in a solution) to even out the electric charges.
In the MDMA.HCl crystals, the positive and negative ions end up in a lattice, where every other ion is positive or negative, repectively, much like as in a sodium chloride crystal (http://www.avogadro.co.uk/definitions/ionic.htm)
(http://www.avogadro.co.uk/definitions/ionic.htm) which consists of Na+ and Cl- ions instead.