Matt Yglesias has a good post on the Arizona senator's ideological peregrinations:
After a generally conservative career, the John McCain who emerged in the 107th Senate really was a moderate Republican. According to the Poole-Rosenthal "optimal classification" algorithm, only Lincoln Chaffee, Arlen Specter, Olympia Snowe, and Susan Collins were less conservative among members of the GOP caucuses. But by the 108th Senate he'd decided not to run for Vice President on John Kerry's ticket, George W. Bush had been re-elected, and McCain decided to shift back far right en route to the nomination. Suddenly only Don Nickles, Jeff Sessions, and Jon Kyl were more conservative than McCain. And in the 109th Senate, only Kyl has been more conservative.
This is, of course, just the point Jon Chait made in his excellent cover story, which is here for any who may have missed it.