The raucous, rags-to- riches story of America’s guru of gracious living is being turned into a tongue-in-cheek theater production.

“Martha! The Unauthorized Musical” tells the life story of Martha Blake, “who with guile and glue gun, rises from her working-class roots to become the doyenne of domesticity,” said John Ekizian, who wrote the show with James-Allen Ford.

“There’s also a nasty bit about insider trading thrown into the mix.”

Martha’s camp yesterday said it would have no comment on the saucy satire, which definitely puts a thinly disguised version of Stewart through the paces.

Sally Wilfert, who last appeared on Broadway in “Assassins” and plays Martha, said she’s landed the role of a lifetime.

“This is a wonderful part – I love it. Martha’s such an interesting person and I have no doubt she’s going to rise again,” Wilfert told The Post.

Martha’s mom is also portrayed, in one scene ripping into her daughter as “a grandiose, opinionated pain in the ass.”

The play will have its first reading Monday at the Producers Club, at 358 W. 44th St., and remains a work in progress for now.

Ford, who composed the music, said he and lyricist Ekizian began working on the show five years ago, long before Stewart was sent to the slammer for lying about a stock trade. But that little development did wonders for their storyline, he admitted.

“I can definitely see it on Broadway some day. That’s what we’re hoping for,” Ford said.

Ekizian added that the production, while full of humor, does have a point.

“Though the tone is decidedly light, the underlying theme is ‘the price of perfection’ that Martha imposes on herself,” he said.