Metabolic labeling of glycans with clickable unnatural sugars has enabled glycan analysis in multicellular systems. However, cell-type-specific labeling of glycans in vivo remains challenging. Here we develop genetically encoded metabolic glycan labeling (GeMGL), a cell-type-specific strategy based on a bump-and-hole pair of an unnatural sugar and its matching engineered enzyme. N-pentynylacetylglucosamine (GlcNAl) serves as a bumped analog of N-acetylglucosamine (GlcNAc) that is specifically incorporated into glycans of cells expressing a UDP-GlcNAc pyrophosphorylase mutant, AGX2