In the marine realm, the tropics host an extraordinary diversity of taxa but the drivers underlying the global distribution of marine organisms are still under scrutiny and we still lack an accurate global predictive model. Using a spatial database for 6336 tropical reef fishes, we attempted to predict species richness according to geometric, biogeographical and environmental explanatory variables. In particular, we aimed to evaluate and disentangle the predictive performances of temperature, habitat area, connectivity, mid-domain effect and biogeographical region on reef fish species richness. We used boosted regression trees, a flexible machine-learning technique, to build our predictive model and structural equation modeling to test for potential ‘mediation effects’ among predictors. Our model proved to be accurate, explaining 80% of the total deviance in fish richness using a cross-validated procedure. Coral reef area and biogeographical region were the primary predictors of reef fish species richness, followed by coast length, connectivity, mid-domain effect and sea surface temperature, with interactions between the region and other predictors. Important indirect effects of water temperature on reef fish richness, mediated by coral reef area, were also identified. The relationship between environmental predictors and species richness varied markedly among biogeographical regions. Our analysis revealed that a few easily accessible variables can accurately predict reef fish species richness. They also highlight concerns regarding ongoing environmental declines, with region-specific responses to variation in environmental conditions predicting a variable response to anthropogenic impacts.