Well, kind of. Communication between various nerve cells in the body utilize chemicals called neurotransmitters to bridge gaps in the nerves (synapses). Neurochemical release is under normal circumstances are controlled by your normal body function. Serotonin is one of those neurotransmitters.
MDMA is primarily a monoamine releaser. (Monoamine is a subcategory of neurotransmitters.) It seems to inhibit various monoamine transport systems that normally regulate the amount of serotonin (and others) that gets released in these gaps. The net result is that your brain is flooded with excess serotonin and other neurotransmitters. But MDMA *also* is a weak agonist of some serotonin receptors -- which means that MDMA itself has the ability to actually bind to certain cell trigger points normally stimulated by serotonin -- and trigger a similar response. (MDA is a stronger serotonin receptor agonist which explains why it is "trippier".) It's a combined effect here.
This is in contrast to classic psychedelics like LSD, which often are strong serotonin receptor agonists but are not monoamine releasers.
When a synapse releases serotonin, it eventually gets re-absorbed into the nervous system after it has performed the function of transmitting the signal. This process is called "reuptake". SSRIs work by inhibiting this reuptake process. This increases the time that the serotonin is in the gap, and thus increases the strength of the signal. The theory is that depression is caused by low serotonin levels, which leads to low levels of neurotransmitters in the gaps. The theory is that increasing the time that serotonin remains in the synapse gap will help depression (which it probably does for some people).
The problem with SSRIs, from a serotonin receptor perspective, is that the body -- faced with more serotonin than it expects -- decreases the sensitivity of its serotonin receptors. This is called "downregulation". (This actually is quite the same phenomenon involved with the MDMA comedown). This is probably fine with some forms of mood disorder treatment, since receptor overactivity of the serotonin system actually is implicit with some mood disorders.
But if serotonin receptors are somehow involved with *some* function when the brain's processing of music, this may in part explain why music just isn't as enjoyable on SSRIs (with downregulated serotonin receptors), but is "better" on many serotonergic compounds (eg, stimulated serotonin receptors -- agonists. Probably the releasing aspect helps too.). On the question of how, I don't know, and I can't see any paper going into huge detail. Makes sense though that there is a connection.
(Mind you, there is so little information out there on how music is processed in the brain, any posturing on what role serotonin really plays in this is quite speculative. I think it's fun to speculate though.

)