Stock characters were first used in the Ancient Greek comedies, and since Shakespeare relied heavily on the classics for his inspiration, he derived the idea of using stock characters from the Greeks. A stock character is any type of character that is seen repeatedly within a literary genre (Dr. Wheeler, "Literary Terms and Definitions: S"). Common stock characters for Shakespeare were reckless young men, love interests, characters who create obstacles, the hero or heroine's parents or guardians, temperamental wives, soldiers who brag, as well as "outlaws, clever servants, female confidantes," and even a "jester, fool or buffoon" (Schwartz, "Shakespeare's Plays: Comedies"). From this list of types of stock characters, we can easily see that Maria fits the role of the "clever servant."
Maria's cleverness is especially demonstrated in the plan she comes up with to foil and humiliate Malvolio. We must remember that it was Maria who devised the plan rather than Sirs Toby or Andrew; the other characters merely followed along with her plan up to a point. One thing Maria finds really really irksome about Malvolio is that, not only is he very self-righteous to the point of being "puritanical," meaning excessively strict, he is also very loved and appreciated by everyone, especially Olivia. Maria describes him as being a "time-pleaser," meaning a "flatterer," and one who puts on airs of dignity (eNotes, II.iii.136). Since she believes that all love Malvolio due to his excessive righteousness and air of dignity, especially Olivia, her idea for revenge is to make Malvolio believe that Olivia sees him as her equal and has fallen in love with him, as we see Sir Toby state after she explains her plan, "He shall think, by the letters that thou wilt drop, that they come from my niece, and that she is in love with him" (II.iii.151-52).
Hence, since Maria comes up with a cunning plan to abuse Malvolio, we see that Maria fits the description of a "cunning servant" stock character.