The gold medal-winning jump at the 2012 Olympics was 4.75m but the world record of 5.06m was set by Russian Elena Isinbaeva in August 2009.
"That last attempt was one of the better jumps I have done," McCartney said. "The attempts I did at the heights before, they were looking promising. But the warm-up wasn't the best... that happens sometimes. That's why I started on an early height, just to get a few jumps in."
McCartney started at 4.35m, before clearing 4.50m and 4.70m with first attempts. After missing the record with her second attempt, she brought the crowd to their feet with her third vault.
The bar was raised to 4.85m, which McCartney almost pulled off with her third attempt.
"It took a couple of attempts to get my head back into it, I had to refocus," she said. "My goal was to go out and jump 4.80m."
The world indoor championships begin with the pole vault events in Portland, Oregon on March 17.
Cantabrian 18-year-old Louise Richards was second with a personal best 3.15m.
- additional reporting Andrew Alderson