Are they pills or powder?
But either way you can dry it out in the open air. Its not going to degrade or anything. Just don't put any heat to it or you could destroy the MDMA. spread it out on a plate or something and leave it to dry for a day or so then seal it back up.
I am assuming that the MDMA is just a bit moist and not waterlogged right? If it is waterlogged you can still dry it out the same way. it will just take longer and you may have to scrape it off the plate with a razor after it is dry.