IntroductionThis study explored the causal connections between gut microbiota (GM), urinary tract infection (UTI), and potential metabolite mediators using Mendelian randomization (MR).MethodsWe utilized summary statistics from the most comprehensive and extensive genome-wide association studies (GWAS) available to date, including 196 bacterial traits for GM, 1,091 blood metabolites, 309 metabolite ratios, alongside UTI data from ukb-b-8814 and ebi-a-GCST90013890. Bidirectional MR analyses were conducted to investigate the causal links between GM and UTI. Subsequently, two MR analyses were performed to identify the potential mediating metabolites, followed by a two-step MR analysis to quantify the mediation proportion.ResultsOur findings revealed that out of the total 15 bacterial traits, significant associations with UTI risk were observed across both datasets. Particularly, taxon g_Ruminococcaceae UCG010 displayed a causal link with a diminished UTI risk in both datasets (ukb-b-8814: odds ratio [OR] = 0.9964, 95% confidence interval [CI] = 0.9930–0.9997, P = 0.036; GCST90013890: OR = 0.8252, 95% CI = 0.7217–0.9436, P = 0.005). However, no substantial changes in g_Ruminococcaceae UCG010 due to UTI were noted (ukb-b-8814: β = 0.51, P = 0.87; ebi-a-GCST90013890: β = −0.02, P = 0.77). Additionally, variations in 56 specific metabolites were induced by g_Ruminococcaceae UCG010, with N-acetylkynurenine (NAK) exhibiting a causal correlation with UTI. A negative association was found between g_Ruminococcaceae UCG010 and NAK (OR: 0.8128, 95% CI: 0.6647–0.9941, P = 0.044), while NAK was positively associated with UTI risk (OR: 1.0009; 95% CI: 1.0002–1.0016; P = 0.0173). Mediation analysis revealed that the association between g_Ruminococcaceae UCG010 and UTI was mediated by NAK with a mediation proportion of 5.07%.DiscussionThis MR study provides compelling evidence supporting the existence of causal relationships between specific GM taxa and UTI, along with potential mediating metabolites.