A fundamental goal of community ecology is to understand species-habitat relationships and how they shape metacommunity structure. Recent advances in occupancy modeling enable habitat relationships to be assessed for both common and rare species within metacommunities using multi-species occupancy models (MSOM). These models account for imperfect species detection and offer considerable advantages over other analytical tools commonly used for community analyses under the elements of metacommunity structure (EMS) framework. Here, we demonstrate that MSOM can be used to infer habitat relationships and test metacommunity theory, using amphibians. Repeated frog surveys were undertaken at 55 wetland sites in southeastern Australia. We detected 11 frog species from three families (Limnodynastidae, Myobatrachidae, and Pelodryadidae). The rarest species was detected at only one site whereas the most common species was detected at 42 sites (naive occupancy rate 0.02-0.76). Two models were assessed representing two competing hypotheses; the best-supported model included the covariates distance to the nearest site (connectivity), wetland area, presence of the non-native eastern mosquitofish (Gambusia holbrooki), proportion cover of emergent vegetation, an interaction term between Gambusia and emergent vegetation cover, and the proportion canopy cover over a site. Hydroperiod played no detectable role in metacommunity structure. We found species-habitat relationships that fit with current metacommunity theory: occupancy increased with wetland area and connectivity. There was a strong negative relationship between occupancy and the presence of predatory Gambusia, and a positive interaction between Gambusia and emergent vegetation. The presence of canopy cover strongly increased occupancy for several tree frog species, highlighting the importance of terrestrial habitat for amphibian community structure. We demonstrated how responses by amphibians to environmental covariates at the species level can be linked to occupancy patterns at the metacommunity scale. Our results have clear management implications: wetland restoration projects for amphibians and likely other taxa should maximize wetland area and connectivity, establish partial canopy cover, and eradicate Gambusia or provide aquatic vegetation to mitigate the impact of this non-native fish. We strongly advocate the use of MSOM to elucidate the habitat drivers behind animal occupancy patterns and to derive unbiased occupancy estimates for monitoring programs.