The MeCP2 gene influences ketamine’s behavioral effect and strengthens synapses, leading to an improvement in the drug’s antidepressant effect over time.