Cleveland is acquiring a 2027 unprotected second-round pick and 2023 protected second-round pick protected through No. 46, sources told Wojnarowski.
McGee, 33, is averaging 8 points and 5.2 rebounds this year. He is expected to serve as a backup to Nuggets All-Star center Nikola Jokic.
This will be the third stint with the Nuggets for the 15-year veteran.
Hartenstein, 22, is averaging 3.5 points and 2.8 rebounds this season.