Pathogenesis is strongly dependent on microbial context, but development of probiotic therapies has neglected the impact of ecological interactions. Dynamics among microbial communities, host immune responses, and environmental conditions may alter the effect of probiotics in human and veterinary medicine, agriculture and aquaculture, and the proposed treatment of emerging wildlife and zoonotic diseases such as those occurring on amphibians or vectored by mosquitoes. Here we use a holistic measure of amphibian mucosal defenses to test the effects of probiotic treatments and to assess disease risk under different ecological contexts. We developed a non-invasive assay for antifungal function of the skin mucosal ecosystem (mucosome function) integrating host immune factors and the microbial community as an alternative to pathogen exposure experiments. From approximately 8500 amphibians sampled across Europe, we compared field infection prevalence with mucosome function against the emerging fungal pathogen Batrachochytrium dendrobatidis. Four species were tested with laboratory exposure experiments, and a highly susceptible species, Alytes obstetricans, was treated with a variety of temperature and microbial conditions to test the effects of probiotic therapies and environmental conditions on mucosome function. We found that antifungal function of the amphibian skin mucosome predicts the prevalence of infection with the fungal pathogen in natural populations, and is linked to survival in laboratory exposure experiments. When altered by probiotic therapy, the mucosome increased antifungal capacity, while previous exposure to the pathogen was suppressive. In culture, antifungal properties of probiotics depended strongly on immunological and environmental context including temperature, competition, and pathogen presence. Functional changes in microbiota with shifts in temperature provide an alternative mechanistic explanation for patterns of disease susceptibility related to climate beyond direct impact on host or pathogen. This nonlethal management tool can be used to optimize and quickly assess the relative benefits of probiotic therapies under different climatic, microbial, or host conditions.