McCarthy (7-5) controlled the Rays on two runs, yielding four hits while walking two and striking out seven.
Sean Doolittle and hurled a perfect eighth inning and Grant Balfour picked up his 14th save for the A's, who came into the contest tied with the Baltimore Orioles for the second American League wild card spot.
Rays starter Jeremy Hellickson (8-9) was touched for four runs on six hits over five full innings, striking out five.
Desmond Jennings knocked a solo homer for the AL wild card leaders.
Celebrity Breakups and divorces of 2014 [PHOTOS]