Pathogens and probiotics have effects on anti-tumor immunity. Pathogens correlated with gastric carcinogenesis comprise Helicobacter pylori, F. nucleatum, and Candida albicans, all of which can suppress immune cell function, stimulate tumor cell proliferation and hinder apoptosis, thereby fostering tumor advancement. Helicobacter pylori upregulate PD-L1 expression in gastric epithelial cells, consequently inducing T cell apoptosis. Helicobacter pylori additionally activate MDSCs, reducing DCs and macrophage function while enhancing Treg cell activity. The F. nucleatum virulence factor Fap2 obstructs tumor elimination by immune cells via binding and interacting with TIGIT on NK cells or lymphocytes. Candida albicans infection leads to heightened expression of the inflammatory factor PGE2. PGE2 diminishes cytokine levels such as IL-1, IL-12, and TNF-α, which restrain DC and NK cell activity and function, obstruct CTL activation, and promote Treg cell maturation, ultimately suppressing tumor immunity. Furthermore, PGE2 facilitates MDSC migration to TME, thus promoting tumor immune escape. Probiotics like Bifidobacterium and B. fragilis elicit robust immune responses, enhance anti-tumor immunity, and impede tumor progression. Bifidobacterium directly stimulates DC maturation and fosters immune response production by T cells. B. fragilis induces macrophage polarization toward the M1 phenotype and enhances macrophage phagocytic capacity. In summary, microbial pathogens associated with gastric carcinogenesis suppress anti-tumor immunity. However, probiotics can potentially enhance anti-tumor immunity, which has significant implications for the treatment and prognosis of gastric cancer. F. nucleatum, Fusobacterium nucleatum; B. fragilis, Bacteroides fragilis; MDSCs, myeloid-derived suppressor cells; Treg cells, regulatory T cells; TIGIT, T cell immunoreceptors with IG and ITIM domains; DC, Dendritic cell; TME, Tumor microenvironment. Created with BioRender.com. (accessed on 17 May 2023).