Yes I have. Hundreds of them, for the Paper Mario fangame topics I've done, original or Recut. Even the latter have completely new characters with no counterparts.
Do you have specific sub series or game in mind when making them?
Always Paper Mario. The classic games were the most story-filled and unique of the series, so that was obvious to me.
What role would they have in an actual game?
That's kind of an open question. If you mean the main platformers, they could run some special Item Houses and serve as NPCs. While I take pride in my characters, playable status in a platformer is a big job for them. I've also made several enemies too that could plausibly show up
What is their relationship to the Canon cast?
For three quick examples...
* Mawk Hawk and Pawk Hawk taught Rawk Hawk how to sawk jawks in the Glitz Pit. (Or more accurately, Mawk Hawk taught him while Pawk Hawk just "supervised".) They're also Rawk's parents.
* Sauf T worked in the kitchens of Peach's Castle for a while to get a scholarship in a faraway region. Because of her place of employment, she knew Mario, Luigi and Peach quite well.
* Starmageddon, the Blight King, was the partner of the Shadow Queen. To make a long story short, the Shadow Queen betrayed him in the aftermath of a huge battle, leaving Starmageddon on a destructive quest for vengeance ever since.
Would you like them to be in a official game?
Yes, especially the Memphawks (the backwards derived species for Rawk Hawk). For more completely original DMZ characters, I'd push for the Frutta (fruit people) and Brustaches (paintbrush people) to become official.
Perhaps if you did not take inspiration from the games, where did you get the idea from?
It depends on the character. Inspiration is wherever you look. I just take a ping-pong approach where I build upon ideas for a character, Mario OC or not. The more compatible traits I decide on, the more the ball bounces between the walls, and the more new ideas naturally spawn.
For more concrete examples...
* Some of Keirf the Sosorrisurf (lobster-eel)'s personality was based on That 90s Kid from Atop the Fourth Wall.
* Shroomsday Core's design took inspiration from Mother D-Reaper and Quartzmon. Meanwhile, his personality was based upon Smaug the Magnificent from the new movie version of The Hobbit.