A Mary Sue is an author-insert character who can out-logic Spock, out-engineer Scotty, etc. and has the whole crew gushing about how awesome she is. I think Piper qualifies. I mean, she defeats the Kobayashi Maru in the very first chapter.
But she's also three or four steps behind Kirk and Spock at every stage of the novel. She's an impressive young officer, yes -- just as the protagonist of any series is usually going to be above the rank and file -- but Kirk is amazing in comparison. He, Spock, and McCoy are the accomplished veterans carrying out a deft master plan that Piper, Sarda, Merete, and Scanner are struggling to keep up with and occasionally stumblingly assisting with. They're the ones talking about how awesome Kirk, Spock, and the rest are.
The point of Piper is not that she's better than Kirk. The point is that she has the potential to be the
next Kirk, but that her potential is still unrealized and unpolished and she needs to learn from Kirk's example. Basically she's much the same character that Chris Pine's Kirk is in the new movies -- a younger, brasher proto-Kirk who needs to be seasoned by experience. Carey herself has written young Kirk in much the same way in
Best Destiny, and probably in her YA
Starfleet Academy Kirk books from the '90s (which I've never managed to read). This is a recurring theme in her work: writing about characters who have the potential for greatness but are still immature and unseasoned, who need to learn hard lessons in order to mature into the heroes they have the potential to be.
And that is the opposite of a Mary Sue. A Mary Sue is someone who's portrayed as impossibly perfect without that portrayal being justified or earned. It's a dull character that the story treats as fascinating, a shallow character the story treats as deep, a stupid character the story alleges is brilliant. Just being an author insertion or a focus of the story isn't enough to make a character a Mary Sue. Those tropes are not intrinsically bad. There have been great author-insertion characters in fiction. There have been many great TV episodes that have centered around guest characters rather than the leads (e.g. TNG's "Half a Life"); indeed, the practice was quite commonplace in '60s TV and TOS itself did it in episodes like "Mudd's Women" and "Charlie X." So those don't make a Mary Sue. What makes a Mary Sue is when those tropes are used
badly. When the featured character has no literary merit, no depth, no appeal to anyone but the author.