
Quoting
flyingron
Smart people do dumb things all the itime.
You need a lawyer. Possession of MDMA is a felony. There are very serious and lifetime implications if you are convicted of this.
How to conduct yourself in court is not something you can go yourself based on the advice on a web forum. Further, this won't be your last court date. If you have the means to get an attorney, do so now. If you are indigent, go to the arraignment, when called plead NOT GUILTY and ask for a public defender. You may wish to talk to the court now and get the affidavit of indigentcy.