Engineering of microbial communities in open environments remains challenging. Here we describe a platform used to identify and modify genetically tractable mammalian microbiota by engineering community-wide horizontal gene transfer events in situ. With this approach, we demonstrate that diverse taxa in the mouse gut microbiome can be modified directly with a desired genetic payload. In situ microbiome engineering in living animals allows novel capabilities to be introduced into established communities in their native milieu.