Catalyzes the addition of meso-diaminopimelic acid to the nucleotide precursor UDP-N-acetylmuramoyl-L-alanyl-D-glutamate (UMAG) in the biosynthesis of bacterial cell-wall peptidoglycan. Is also able to use many meso-diaminopimelate analogs as substrates, although much less efficiently, but not L-lysine. ATP + meso-2,6-diaminoheptanedioate + UDP-N-acetyl-alpha-D-muramoyl-L-alanyl-D-glutamate = ADP + H(+) + phosphate + UDP-N-acetyl-alpha-D-muramoyl-L-alanyl-gamma-D-glutamyl-meso-2,6-diaminoheptanedioate Activated by potassium phosphate. Optimum pH is about 8. Cell wall biogenesis; peptidoglycan biosynthesis. Carboxylation is probably crucial for Mg(2+) binding and, consequently, for the gamma-phosphate positioning of ATP. Belongs to the MurCDEF family. MurE subfamily.