Type 2 diabetes (T2D) is associated with reduced gut microbiome diversity, although the cause is unclear. Metabolites generated by gut microbes also appear to be causative factors in T2D. We therefore searched for serum metabolites predictive of gut microbiome diversity in 1018 females from TwinsUK with concurrent metabolomic profiling and microbiome composition. We generated a Microbial Metabolites Diversity (MMD) score of six circulating metabolites that explained over 18% of the variance in microbiome alpha diversity. Moreover, the MMD score was associated with a significantly lower odds of prevalent (OR[95%CI] = 0.22[0.07;0.70], P = .01) and incident T2D (HR [95%CI] = 0.31[0.11,0.90], P = .03). We replicated our results in 1522 individuals from the ARIC study (prevalent T2D: OR[95%CI] = 0.79[0.64,0.96], P = .02, incident T2D: HR[95%CI] = 0.87[0.79,0.95], P = .003). The MMD score mediated 28%[15%,94%] of the total effect of gut microbiome on T2D after adjusting for confounders. Metabolites predicting higher microbiome diversity included 3-phenylpropionate(hydrocinnamate), indolepropionate, cinnamoylglycine and 5-alpha-pregnan-3beta,20 alpha-diol monosulfate(2) of which indolepropionate and phenylpropionate have already been linked to lower incidence of T2D. Metabolites correlating with lower microbial diversity included glutarate and imidazole propionate, of which the latter has been implicated in insulin resistance. Our results suggest that the effect of gut microbiome diversity on T2D is largely mediated by microbial metabolites, which might be modifiable by diet.