He is the seventh president with at least one foreign-born parent. It has been 76 years since the last: Herbert Hoover had a Canadian-born mother. Woodrow Wilson's mother was English. Chester Arthur and James Buchanan both had Irish fathers. Thomas Jefferson's mother was born in England, and Andrew Jackson's parents were both born in Ireland.
Along with McCain, presidential contender Mitt Romney's father was born in Mexico, and Bill Richardson's parents were both foreign-born, his father from Nicaragua and his mother from Mexico.
And why are all of these people eligible for the presidency of the United States? Because the Supreme Court, after citing many, many precedents, ultimately decided in US v. WONG KIM ARK (1898) that the 14th Amendment guaranteed citizenship to all persons born in the United States, regardless of their ethnic heritage:
The foregoing considerations and authorities irresistibly lead us to these conclusions: The fourteenth amendment affirms the ancient and fundamental rule of citizenship by birth within the territory, in the allegiance and under the protection of the country, including all children here born of resident aliens, with the exceptions or qualifications (as old as the rule itself) of children of foreign sovereigns or their ministers, or born on foreign public ships, or of enemies within and during a hostile occupation of part of our territory, and with the single additional exception of children of members of the Indian tribes owing direct allegiance to their several tribes. The amendment, in clear words and in manifest intent, includes the children born within the territory of the United States of all other persons, of whatever race or color, domiciled within the United States. Every citizen or subject of another country, while domiciled here, is within the allegiance and the protection, and consequently subject to the jurisdiction, of the United States. His allegiance to the United States is direct and immediate, and, although but local and temporary, continuing only so long as he remains within our territory, is yet, in the words of Lord Coke in Calvin's Case, 7 Coke, 6a, 'strong enough to make a natural subject, for, if he hath issue here, that issue is a natural-born subject'; and his child, as said by Mr. Binney in his essay before quoted, 'If born in the country, is as much a citizen as the natural-born child of a citizen, and by operation of the same principle.'