The 34-year-old McGrath, who has missed Test series against Zimbabwe, India and Sri Lanka, is playing in his second competitive match after seven months on the sidelines with an ankle injury.
McGrath captured 2-26 off 14 overs for the New South Wales (NSW) Second XI against Victoria. He showed no ill-effects of his ankle injury in three short spells of bowling, helping bowl Victoria's seconds out for 234.
In reply at stumps of day one of the four-day match, NSW are 28 without loss.
McGrath returned to cricket last Saturday, taking 1-11 off 10 overs for his club side Sutherland in the Sydney competition. He hopes to be fit enough to be considered for selection for Australia's tour of Zimbabwe in May. McGrath has taken 430 wickets in 95 Tests.
McGrath racing against time