A general method for preparing glycoprotein mimetics with defined glycan structure using the Z domain protein as an example is reported. An unnatural amino acid containing the keto group was site-specifically incorporated into a target protein, Z domain, in response to the amber nonsense codon with high translational fidelity and efficiency. An aminooxy saccharide derivative was then selectively coupled to this genetically encoded keto group. The resulting saccharide core was elaborated to a glycan complex with glycosyltransferases. Alternatively, aminooxy analogues of more complicated glycans were prepared and directly attached to the keto group. Homogeneous glycoprotein mimetics thus prepared should prove useful for the study of carbohydrate effects on glycoprotein structure and function. This method may also lead to the production of glycoprotein therapeutics from Escherichia coli.