Optical modulation of proteins provides superior spatiotemporal resolution for understanding biological processes, and photoswitches built on light-sensitive proteins have been significantly advancing neuronal and cellular studies. Small molecule photoswitches could complement protein-based switches by mitigating potential interference and affording high specificity for modulation sites. However, genetic encodability and responsiveness to nonultraviolet light, two desired properties possessed by protein photoswitches, are challenging to be engineered into small molecule photoswitches. Here we developed a small molecule photoswitch that can be genetically installed onto proteins in situ and controlled by visible light. A pentafluoro azobenzene-based photoswitchable click amino acid (F-PSCaa) was designed to isomerize in response to visible light. After genetic incorporation into proteins via the expansion of the genetic code, F-PSCaa reacts with a nearby cysteine within the protein generating an azo bridge in situ. The resultant bridge is switchable by visible light and allows conformation and binding of CaM to be regulated by such light. This photoswitch should prove valuable in optobiology for its minimal interference, site flexibility, genetic encodability, and response to the more biocompatible visible light.