Venlafaxine and MDMA or psilocybin. Can they be taken together?
More info: Psilocybin and medication | MDMA information sheet

Venlafaxine (Efexor) is a SNRI which inhibits the reuptake of serotonin and noradrenaline. This has important consequences for combining with both MDMA as psilocybin.
With MDMA
This combination is strongly advised against. Both venlafaxine and MDMA affect serotonin levels, and together this can lead to a dangerous excess of serotonin, the serotonin syndrome. This is a potentially life-threatening condition with symptoms such as high fever, confusion, muscle stiffness, high blood pressure, and in severe cases, epileptic seizures.
In addition, venlafaxine can flatten the desired euphoric and empathogenic effects of MDMA, making the experience less intense while the risks actually increase.
Conclusion: do not combine. Tapering off (under medical supervision) is necessary if you want to have an MDMA session.
With psilocybin
The situation is different here. Recent research and practical experience show that psilocybin and venlafaxine together do not pose an acute danger as with MDMA. However, venlafaxine does affect the experience: it can noticeably dampen the psychedelic effects of psilocybin and make emotions less intense.
Some people choose to taper off their medication before a psilocybin session to experience the full depth and emotional range. This must always be done in consultation with the treating physician, as venlafaxine can cause severe withdrawal symptoms if stopped too soon.
If you are considering using psilocybin while taking venlafaxine, a choice is often made for a slightly higher dosage of psilocybin or a more guided setting to still arrive at valuable insights, despite the attenuation.
You can read more in the detailed explanation about psilocybin and antidepressants, or start with the intake for psychedelic therapy to have your personal situation assessed.