According to RIA Novosti, he told reporters about this after a meeting at the White House with US President Joe Biden.
"I don't think China can tell me where to go - anytime, anywhere," McCarthy said.
Earlier, US General Mike Minihan suggested that the US would be at war with China in two years.
It was also reported that the Pentagon is planning a visit by Speaker of the US House of Representatives Kevin McCarthy to Taiwan.