You may want to do alot of googling , some may say ask your doctor but I know that can be tough to say "hey doc uhm I'm taking mdma , is lithium going to kill me with it?" .. so I would do as much research as possible , I will do some as I am doing some research on lsd use interferring with the "vacation" or days off from mdma for serotonin reuptake and if lsd interrupts the process .
Hope I can help you eventually but usually the ideal thing to do is to be off all drugs expecially ssri/maos?(maios? I forget the abbreviation sorry) as they mess with certain chemicals like serotonin that can lead to a bad back firing when you take mdma unfortunately .
It may be lethal so I would caution against combinding the 2 drugs and if possible stay off lithium for a day if you actually can ( I am prescribed adderall xr , temazepam and clonazepam ..not all even lethal combos though not suggested to mix them I certainly can but instead I try and avoid them for at least a day or 2 ..I know how hard that can be ..lethal even if you're on something for too long so remember this is just me saying what I know so far not what's healthy/best for you as far as I know ..so far..)
why are you on lithium may I ask ?