This study aimed to isolate endophytic fungi from the mangrove plant Rhizophora mucronata and test their antibacterial activity against Staphylococcus aureus and Escherichia coli. A total of 5 fungal strains were isolated from leaf, stem, and root tissues. Penicillium sp. extracted from the roots showed the strongest antibacterial activity against both bacteria in a Kirby-Bauer test. The results suggest that endophytic fungi from mangroves are a potential source of antibacterial compounds, with Penicillium sp. being the most potent against foodborne pathogens.