Efforts to identify anti-cancer therapeutics are attempted with in vitro models that do not match the microenvironmental characteristics of human tissues. Using biocompatible hydrogels that mimic healthy or cancerous tissues and conventional or physiologically relevant culture medium, we systematically demonstrate that the chemical and physical properties of the microenvironment regulate the composition and topology of the glycocalyx, a pericellular matrix composed of carbohydrate-conjugates. Remarkably, we find that cancer and age-related changes in the physical properties of the microenvironment are sufficient to adjust immune surveillance via the topology of the glycocalyx, a previously unknown phenomenon observable only with physiologically relevant culture medium.