Efficient methods for the generation of specific mutations enable the study of functional variations in natural populations and lead to advances in genetic engineering applications. Here, we present a new approach, mutagenesis by template-guided amplicon assembly (MEGAA), for the rapid construction of kilobase-sized DNA variants. With this method, many mutations can be generated at a time to a DNA template at more than 90% efficiency per target in a predictable manner. We devised a robust and iterative protocol for an open-source laboratory automation robot that enables desktop production and long-read sequencing validation of variants. Using this system, we demonstrated the construction of 31 natural SARS-CoV2 spike gene variants and 10 recoded Escherichia coli genome fragments, with each 4 kb region containing up to 150 mutations. Furthermore, 125 defined combinatorial adeno-associated virus-2 cap gene variants were easily built using the system, which exhibited viral packaging enhancements of up to 10-fold compared with wild type. Thus, the MEGAA platform enables generation of multi-site sequence variants quickly, cheaply, and in a scalable manner for diverse applications in biotechnology.