In 2022, McGee made 24 appearances for San Francisco but struggled to a 7.17 ERA with 11 strikeouts and 3 saves in 21.1 innings pitched. On July 9, 2022, McGee was designated for assignment after Luis González was activated off of the injured list. On July 14, McGee was released by the Giants.
