Here, authors show that glutamatergic FKBP51 specifically in females mediates adaptive stress effects on anxiety and cognition via TCF4. Here, TCF4 is linked to Anxiety.