Rhiannon at Feminist Fiction makes an interesting and important point about the idea of the Mary Sue:
And even though I hear the term “Mary Sue” all the time, I don’t think I’ve ever seen or read about a female James Bond, or a female Indiana Jones, or a female Bruce Wayne. At least not in adult fiction. The idea is almost inconceivable, because female characters are already despised and dismissed for far more realistic flaws, like being too well-liked, too successful or too favored by the narrative. So the Doctor in Doctor Who swans around saving the universe and being loved by everyone he meets, but Rose Tyler is a Mary Sue because the Doctor falls in love with her. No medieval knight is called a Marty Stu, but Alanna in Tamora Pierce’s Tortall series is dismissed because she fights gender conventions to become one. Harry Potter is the youngest seeker in 100 years, not to mention the Chosen One, but Ginny Weasley is a Sue because she’s also talented at Quidditch, has a talent for a particular hex and eventually married her childhood crush. Any time a female character becomes important in the narrative, or loved by an idolized male character, or seems to lack humility and sweetness, someone will disparage her as a Mary Sue. And it creates a painful mixed message about the kind of female characters the world wants to see. They can’t be weak and silly and unimportant, but they can’t be too strong, too important, too appealing as role models and heroes to female viewers. They must remain in a safe, unthreatening middle ground.
The Mary Sue is an idea invented in Star Trek fan fiction circles, sometime in the late sixties/early seventies. This was arguably the first media based fandom, the first fandom to be dominated by women and the first in which fan fiction, stories written by fans based on the show, were a huge and important part of that fandom. It’s where slash was invented, the ancestor of all fan fiction fandoms. In that context, the Mary Sue was invented as the name for the new, somewhat too perfect ensign that joins the Enterprise, wins the hearts of both Kirk and Spock, can beat the latter in logic puzzles and the former in bravery, knows more about medicine than Bones, more of engines than Scotty, is loved and adored by everyone, but often dies tragically and above all is a standin for the author.
As with many critical terms divorced from their original context, its meaning has slipped to the point where, as Rhiannon notes, it can be used as a slur against any female character somebody dislikes for being too good, when the same perfection would go unnoticed in a male character.
Male characters can be Mary Sues as well of course; one could argue James Bond was one for Ian Fleming in the same way Harriet Vane was for Dorothy Sayers: an obvious author standin. In Fleming’s case, to live the life of adventure he himself wanted, in Sayers case because she had fallen in love with her own creation, Lord Peter Wimsey. Sometimes these are called Marty Stu rather than Mary Sue, but that is a much rarer term. As seen from both of these examples, a Mary Sue is not necessarily a bad character, but it is the sort of character used more by bad writers…
What Rhiannon sees, that difference in how male and female characters are often judged, where it’s much more acceptable for a male character to be a (male) wish fulfilment fantasy than it is for a woman to be a (female) wish fulfilment fantasy, is important. But perhaps we shouldn’t blame it on the poor old Mary Sue, who really is pretty harmless.