Metal binding proteins have a central role in maintaining life processes. Nearly one-third of known protein structures contain metal ions that are used for a variety of needs, such as catalysis, DNA/RNA binding, protein structure stability, etc. Identifying metal binding proteins is thus crucial for understanding the mechanisms of cellular activity. However, experimental annotation of protein metal binding potential is severely lacking, while computational techniques are often imprecise and of limited applicability. We developed a novel machine learning-based method, mebipred, for identifying metal binding proteins from sequence-derived features. This method is over 80% accurate in recognizing proteins that bind metal ion-containing ligands; the specific identity of eleven ubiquitously-present metal ions can also be annotated. mebipred is reference-free, i.e. no sequence alignments are involved, and is thus faster than alignment-based methods; it also more accurate than other sequence-based prediction methods. Additionally, mebipred can identify protein metal binding capabilities from short sequence stretches, e.g. translated sequencing reads, and, thus, may be useful for the annotation of metal requirements of metagenomic samples. We performed an analysis of available microbiome data and found that ocean, hot spring sediments, and soil microbiomes use a more diverse set of metals than human host-related ones. For human microbiomes, physiological conditions explain the observed metal preferences. Similarly, subtle changes in ocean sample ion concentration affect the abundance of relevant metal binding proteins. These results highlight mebipred's utility in analysing microbiome metal requirements. mebipred is available as a web server at services.bromberglab.org/mebipred and as a standalone package at https://pypi.org/project/mymetal/. Supplementary data are available from Bioinformatics online repository. Additional data is available from http://dx.doi.org/10.5281/zenodo.5722730 and http://dx.doi.org/10.5281/zenodo.6332940. © The Author(s) 2022. Published by Oxford University Press.