Our findings should facilitate the development of SHMT inhibitors as therapeutic agents for bacterial, viral and parasite infections and for treating cancer. Here, SHMT1 is linked to cancer.