A protein on the surface of a cell that can recognise and attach to an antigen.