Genetically encoded fluorescent sensor proteins offer the possibility to probe the concentration of key metabolites in living cells. The approaches currently used to generate such fluorescent sensor proteins lack generality, as they require a protein that undergoes a conformational change upon metabolite binding. In this thesis, a novel approach is presented that overcomes this limitation. Our sensor proteins consist of a combination of two different self-labeling protein tags and a metabolite binding protein. The sensor protein is specifically labeled with a molecule containing a ligand of the metabolite-binding protein and a fluorophore. In the labeled sensor protein, the metabolite of interest displaces the intramolecular ligand from the binding protein, thereby shifting the sensor protein from a closed conformation to an open conformation. This leads to a detectable FRET efficiency change of the sensor protein. Specifically, a proof of concept sensor protein for sulfonamides and Zn2+ was developed using human carbonic anhydrase II (HCA) as the binding protein, and a thorough in vitro characterization of the sensor protein was carried out. Subsequently, the successful implementation of the sensor protein concept on the cell surface of mammalian cells was demonstrated. Further, simple guidelines for the optimization of the sensor proteins were proposed using a qualitative model of its molecular mechanism and they were also experimentally validated. Finally, a semisynthetic sensor protein for the neurotransmitter glutamate was generated and applied to sense glutamate on the cell surface of mammalian cells. This work establishes a generally applicable strategy for the generation of fluorescent sensor proteins to detect previously inaccessible metabolites on the cell surface.