This is all in good fun. This is not to be taken seriously. But its fun to read over for a laugh. o.O maybe.
Step one, the appearance.
Give your character your hair color, style and length. Or make silken (any color) and long, preferably blonde.
Give the character your eye color. Or make them beautiful blue eyes.
Give him or her your weight, height, and overall appearance really if you can't make them look exactly like yourself.
If you want this to be a character for fan fictions give the character the appearance of your favorite canon character, but change it accordingly to fit the gender.
If human, make this character look a hell of a lot younger then he or she really is.
Give the character absolutely no physical handicaps or imperfections, perfect body and so on. This goes with the mind as well.
Give the character your dress style or a dress style to find particularly cool/sexy/etc.
Step two, the name.
If at all possible, give the character your name, a variation of your name or a name you like to use.
If you do not want to do this, give the character the name Raven, Midnight, Star or a name with an apostrophe or hyphen added in randomly for no reason what so ever.
Maybe naming them blatantly Mary-Sue, Billy-Bob, Lary-Stu, or Gary-Stu will suit your fancy?
For just the slightest touch of originality, name the character a name you like or would prefer to be called.
If you can possibly manage it, make sure they have a nickname they prefer to be called over their real name. Possibly even a nickname you would prefer to be called.
You can, of course, consider this last option. Give the character a name similar to that of a well-known canon character. Whether it be in a different language or adding or subtracting a letter, or switching a letter.
Step three, the past.
Make the character's past a living hell.
If you can, make the character born into slavery. If not consider one of the following options.
Perhaps abandoned by parents? No? How about having one or both parents murdered in front of eyes? Maybe killing one or both of parents without meaning to?
Have the character been raped or abused sexually. For added bonus make it by someone of the same gender, or possibly even family. If at all possible, make it both.
Have the character feel guilty for something he or she could never have possibly done, but the character still feels guilty in any case.
Step four, the personality.
Give the character your exact personality, down to every last idiosyncrasy.
If not, make the character very very sad, sorrowful and angsty. Have the character tell his or her past every time he or she gets the chance.
Or make them terribly kind and polite. Giving at every possible moment, but still telling of the past any time possible. Have the character be kind to anyone and have anyone be terribly kind to the character, even if it would be illogical. (Like a stereotypical demon being friendly and amiable to a human)
No matter what you do, make sure that it is a perfect personality.
Step five, the abilities. (This is a touch and go section, since non-Mary-sue's can have these abilities.)
Make the character have unnatural powers, even for race and setting. In example, a human having telekinetic powers in a modern day setting of the normal world.
Make the character have the ability to do anything, without consequence. In example, shape shift, without any repercussions.
The ability to speak multiple languages, even if it was not necessary. Such as, a person in America in a family that speaks English, who has learned Spanish or any other second language, but in their own time learns Chinese.
The ability to use swords to perfection.
This is absolutely vital, the ability to sing perfectly.
The ability to play one if not more instruments.
Make the character have excellent aim and super smart, and perfection in everything he or she does.
Step six, the plot.
Make the character very quickly a main character of your story.
Have the character fall in love instantly, or have another character fall in love with him or her instantly. If at all possible, do the later and have the character in question prefer the other gender of your character previously or currently in a long-standing relationship.
Have the character get all the important stuff to do that other characters had previously, and get all the glory.
Near the end of the story, have your character get gravely injured in a heroic effort to save the world or someone else, and succeed.
If possible, make the wound so terrible that there should be no way for you character to survive, but yet he or she does, only because of the love of the other character in the second step of this step.
OR, make the character die flat-out and have the other character(s) in love with your character grieved and vow never to love again. (Because what else would be more typical of a Mary-Sue death?)
If the character dies, bring him or her back to life miraculously in an epilogue eight years later after the body has been incinerated or decomposed.
And there you go, how to make a perfect Mary-Sue in six easy steps.