Helicobacter pylori (H. pylori) is a common pathogen with a high prevalence of infection in human populations. The diagnosis of H. pylori infection is critical for its treatment, eradication, and prognosis. Biosensors have been demonstrated to be powerful for the rapid onsite detection of pathogens, particularly for point-of-care test (POCT) scenarios. In this work, we propose a novel optical biosensor, based on nanomaterial porous silicon (PSi) and photonic surface state Tamm Plasmon Polariton (TPP), for the detection of cytotoxin-associated antigen A (CagA) of H. pylori bacterium. We fabricated the PSi TPP biosensor, analyzed its optical characteristics, and demonstrated through experiments, with the sensing of the CagA antigen, that the TPP biosensor has a sensitivity of 100 pm/(ng/mL), a limit of detection of 0.05 ng/mL, and specificity in terms of positive-to-negative ratio that is greater than six. From these performance factors, it can be concluded that the TPP biosensor can serve as an effective tool for the diagnosis of H. pylori infection, either in analytical labs or in POCT applications.