With Federation in 1901 came the opportunity to run for the new Parliament of Australia.
McCay contested the 1901 election as a Protectionist Party candidate for Corinella, the Federal electorate that encompassed the Castlemaine area.
McCay, who characterised himself as a liberal, supported the widest possible enfranchisement of women, the protection of industry and revenue through tariffs, and the White Australia policy.
The war in South Africa was now in its final stages and the electorate forgot or forgave McCay's "treason", electing him to the first Australian Parliament.

As a backbencher, McCay opposed amendments to the Defence Act 1903 proposed by Billy Hughes of the Australian Labor Party that called for peacetime conscription.
He accepted its necessity in wartime, but only for service within Australia.
McCay believed that volunteers would always be plentiful, and he feared that peacetime conscription would result in militarism.
He was re-elected unopposed in the 1903 election, the first in which Victorian women were eligible to vote.
In 1904, McCay moved an amendment to the Conciliation and Arbitration Act 1904 to remove the clause that empowered the Commonwealth Court of Conciliation and Arbitration to give preference to trade unions.
The debate became unexpectedly heated and resulted in the fall of Chris Watson's Labor government.
The Free Trade Party's George Reid became Prime Minister and offered McCay the post of Minister for Defence.

McCay became the sixth Minister for Defence in four years.
His predecessor, Senator Anderson Dawson, had chaired a committee that had produced a detailed report recommending the abolition of the post of General Officer Commanding Australian Military Forces and the creation of a Council of Defence, a Naval Board and a Military Board.
It fell to McCay to implement the report's recommendations and create a five-man Military Board consisting of himself, a finance member and three military officers.
McCay preferred the senior member not be styled the Chief of the General Staff.
This change would not be made until 1909.
At the first meeting of the Council of Defence, McCay rejected the arguments of Captain William Rooke Creswell for the majority of the defence budget to be spent on supporting the British fleet.
In 1905 the Reid government collapsed and McCay became a backbencher once more.
Since the Federal parliament sat in Parliament House, Melbourne, McCay lived at the Stock Exchange Club in Collins Street, Melbourne while his family remained in Castlemaine.
He maintained a liaison with a married woman, Ella Gavan Duffy.

In the 1906 redistribution, McCay's electorate of Corinella was abolished and its territory divided between the electorates of Laanecoorie and Corio.
McCay decided to run in Corio against the sitting member, Richard Crouch, although he was also a Protectionist, but Crouch won convincingly.
In 1910, the Commonwealth Liberal Party Senate candidate, Thomas Skene, died suddenly two days before the nomination date for the 1910 election.
McCay submitted himself as candidate but lost.
With Federation in 1901 came the opportunity to run for the new Parliament of Australia. McCay contested the 1901 election as a Protectionist Party candidate for Corinella, the Federal electorate that encompassed the Castlemaine area. McCay, who characterised himself as a liberal, supported the widest possible enfranchisement of women, the protection of industry and revenue through tariffs, and the White Australia policy. The war in South Africa was now in its final stages and the electorate forgot or forgave McCay's "treason", electing him to the first Australian Parliament.
As a backbencher, McCay opposed amendments to the Defence Act 1903 proposed by Billy Hughes of the Australian Labor Party that called for peacetime conscription. He accepted its necessity in wartime, but only for service within Australia. McCay believed that volunteers would always be plentiful, and he feared that peacetime conscription would result in militarism. He was re-elected unopposed in the 1903 election, the first in which Victorian women were eligible to vote. In 1904, McCay moved an amendment to the Conciliation and Arbitration Act 1904 to remove the clause that empowered the Commonwealth Court of Conciliation and Arbitration to give preference to trade unions. The debate became unexpectedly heated and resulted in the fall of Chris Watson's Labor government. The Free Trade Party's George Reid became Prime Minister and offered McCay the post of Minister for Defence.
McCay became the sixth Minister for Defence in four years. His predecessor, Senator Anderson Dawson, had chaired a committee that had produced a detailed report recommending the abolition of the post of General Officer Commanding Australian Military Forces and the creation of a Council of Defence, a Naval Board and a Military Board. It fell to McCay to implement the report's recommendations and create a five-man Military Board consisting of himself, a finance member and three military officers. McCay preferred the senior member not be styled the Chief of the General Staff. This change would not be made until 1909. At the first meeting of the Council of Defence, McCay rejected the arguments of Captain William Rooke Creswell for the majority of the defence budget to be spent on supporting the British fleet. In 1905 the Reid government collapsed and McCay became a backbencher once more. Since the Federal parliament sat in Parliament House, Melbourne, McCay lived at the Stock Exchange Club in Collins Street, Melbourne while his family remained in Castlemaine. He maintained a liaison with a married woman, Ella Gavan Duffy.
In the 1906 redistribution, McCay's electorate of Corinella was abolished and its territory divided between the electorates of Laanecoorie and Corio. McCay decided to run in Corio against the sitting member, Richard Crouch, although he was also a Protectionist, but Crouch won convincingly. In 1910, the Commonwealth Liberal Party Senate candidate, Thomas Skene, died suddenly two days before the nomination date for the 1910 election. McCay submitted himself as candidate but lost.
James Whiteside McCay