The widespread use of caffeine (1,3,7-trimethylxanthine) and other methylxanthines in beverages and pharmaceuticals has led to significant environmental pollution. We have developed a portable caffeine degradation operon by refactoring the alkylxanthine degradation (Alx) gene cluster from Pseudomonas putida CBB5 to function in Escherichia coli. In the process, we discovered that adding a glutathione S-transferase from Janthinobacterium sp. Marseille was necessary to achieve N 7 -demethylation activity. E. coli cells with the synthetic operon degrade caffeine to the guanine precursor, xanthine. Cells deficient in de novo guanine biosynthesis that contain the refactored operon are ″addicted″ to caffeine: their growth density is limited by the availability of caffeine or other xanthines. We show that the addicted strain can be used as a biosensor to measure the caffeine content of common beverages. The synthetic N-demethylation operon could be useful for reclaiming nutrient-rich byproducts of coffee bean processing and for the cost-effective bioproduction of methylxanthine drugs.