This study reveals PCDH17 as a context-dependent regulator of tumor microenvironments across cancers. Here, PCDH17 is linked to cancer.