The plasticity of brain development means that early experiences can lead to defects in neural mechanisms, contributing to mental disorders such as stress, anxiety and depression. Dorsal raphe nucleus (DRN) serotonin (5-HT) neurons play key roles in these pathways, but how developing synaptic inputs contribute to shaping the activity of DRN 5-HT neurons was unknown. Now, Mariano Soiza-Reilly and colleagues interrogate the nascent synaptic network in mice. They image postnatal trajectories of excitatory glutamate neurons and inhibitory GABA neurons contacting DRN 5-HT neurons, and find their contacts undergo a profound refinement after postnatal day 21 (P21). Functionally, they find that there are more slower miniature excitatory post-synaptic currents (mEPSCs) at P21, whereas faster mEPSCs are dominant at P28, reflecting a change from cortical to subcortical inputs. Likewise, they discover a reduction in frequency and amplitude of GABA currents at P28 compared with P21. They observe that 5-HT1A receptor-mediated inhibition, which modulates the DRN 5-HT neurons, is active but is not modified between P21 and P28. Together, these results indicate that a profound refinement of the DRN 5-HT network occurs 3 weeks after birth and may provide a model for investigating the link between neurodevelopment and the risk of mental disorders.