Here, the authors apply DESI-MS, a sample preparation-free, direct on-swab mass spectrometry analytical tool, to profile the cervicovaginal metabolome of two independent cohorts of pregnant women and, combined with matched metataxonomic and immuno-profiling data, show that DESI-MS predicts vaginal microbiota composition and local inflammatory status associated with preterm birth and clinical interventions used during pregnancy.