The chromophore 3-Z phycocyanobilin (PCB, (2R,3Z)-8,12-bis(2-carboxyethyl)-18-ethyl-3-ethylidene-2,7,13,17-tetramethyl-2,3-dihydrobilin-1,19(21H,24H)-dione) mediates red and far-red light perception in natural and synthetic biological systems. Here we describe a PCB synthesis strategy in mammalian cells. We optimize the production by co-localizing the biocatalysts to the substrate source, by coordinating the availability of the biocatalysts and by reducing the degradation of the reaction product. We show that the resulting PCB levels of 2 μM are sufficient to sustain the functionality of red light-responsive optogenetic tools suitable for the light-inducible control of gene expression in mammalian cells. © 2013 The Royal Society of Chemistry.