Brendan Nyhan notes that if you use the Keith-Poole methodology for congressional ideology you get the conclusion that John McCain has the most inconsistent record of anyone in the Senate. They write in Congress and Ideology that their model has the least predictive power when it comes to McCain:
John McCain (R-AZ), normally one of the very most conservative members of the Senate, has been the worst fitting member of the Senate in each of his eight Senates, most notably the 103rd (2001-02), where he frequently voted with the Democrats, perhaps in pique over losing the race for the presidential nomination in 2000. [...] John McCain (R-AZ) started as a conservative, became a moderate after losing the Republican nomination to George Bush in 2000, and recently reemerged as very conservative.
The positive spin on this is that McCain is a "maverick." Looked at in a less adoring light, it's just very hard to see any underlying principles about domestic policy running through McCain's career.