Surgeons have unique in situ access to tumors enabling them to apply immunotherapies to resection margins as a means to prevent local recurrence. Here, we developed a surgical approach to deliver stimulator of interferon genes (STING) ligands to the site of a purposeful partial tumor resection using a gel-based biomaterial. In a range of head and neck squamous cell carcinoma (HNSCC) murine tumor models, we demonstrate that although control-treated tumors recur locally, tumors treated with STING-loaded biomaterials are cured. The mechanism of tumor control required activation of STING and induction of type I IFN in host cells, not cancer cells, and resulted in CD8 T-cell–mediated cure of residual cancer cells. In addition, we used a novel tumor explant assay to screen individual murine and human HNSCC tumor responses to therapies ex vivo. We then utilized this information to personalize the biomaterial and immunotherapy applied to previously unresponsive tumors in mice. These data demonstrate that explant assays identify the diversity of tumor-specific responses to STING ligands and establish the utility of the explant assay to personalize immunotherapies according to the local response. Significance: Delivery of immunotherapy directly to resection sites via a gel-based biomaterial prevents locoregional recurrence of head and neck squamous cell carcinoma.