It's not dangerous at as far as the combination itself goes. The only danger is falling into an overdose because you took too much codeine without realizing since the MDMA is a stimulant, and will cancel out any signs.
Whatever codeine dosage you take, make sure it's something you're used to, and have done many times before.
Other than that, it's pretty fun, and a pleasant combination.