Here, the authors show that inhibition of leukocyte P2X7 receptors reduces dendritic spine pathology and social behavioral deficits in a mouse model of Rett syndrome. This evidence concerns the gene P2RX7 and Rett syndrome.