McGee struck out Wilson Betemit to end the inning. He then returned to pitch the sixth and struck out the side.
"I knew I was going to feel good, my arm was going to feel good, but sometimes when you have four or five days off, your location isn't as good," said McGee, who had not pitched since Sept. 5 before Wednesday night's stint.
McGee is 5-2 with a 1.96 ERA in 59 games and has not allowed a run in 17 straight appearances dating back to July 18 against Cleveland.
"I'm just feeling good," McGee said. "My mind's in a good place. Just thinking about each pitch at a time instead of just throwing what the catcher puts down. I've been thinking about the pitch I'm going to throw next. I have more of a game plan."
McGee has never looked rattled when he's come in, but this season he has look particularly calm, which he attributed to feeling good about his stuff.
"Yeah, I think if I have the confidence where if I throw my fastball in the location where I want to, nobody can really hit it," McGee said.
McGee is a converted reliever after spending most of his time in the Minor Leagues as a starter.
"I think I've figured out a lot more [about being a reliever] from talking to guys," McGee said. "... I've learned from multiple guys and picked guys' brains."
Rays manager Joe Maddon said he is not afraid to use McGee in any situation during the game.