The Master Key: An Electrical Fairy Tale, Founded Upon the Mysteries of Electricity and the Optimism of Its Devotees is a 1901 novel by L. Frank Baum, author of The Wonderful Wizard of Oz. It was illustrated by F. Y. Cory.
The protagonist is a boy named Rob Joslyn. His age is not specified. Baum dedicated the book "To My Son, Robert Stanton Baum," who was born in 1886 and would thus have been about fifteen at the time it was published.
Rob is an electrical experimenter whose father encourages him and sees that he "never lacked batteries, motors or supplies of any sort." A "net-work[sic] of wires soon ran throughout the house". He loses track of the elaborately interconnected wires, and trying to get a cardboard house to light up, he "experimented in a rather haphazard fashion, connecting this and that wire blindly and by guesswork, in the hope that he would strike the right combination." There is a bright flash, and a being who calls himself the Demon of Electricity appears. He tells Rob that he has accidentally "touched the Master Key of Electricity" and is entitled "to demand from me three gifts each week for three successive weeks." Rob protests that he does not know what to ask for, and the Demon agrees to select the gifts himself.
During the first week, the Demon gives Rob three gifts:
During the second week, the Demon gives Rob three additional gifts:
Over the next two weeks, Rob experiences adventures exploring the use of the Demon's gifts, but eventually concludes that neither he nor the world is ready for them. On the third week, Rob rejects the Demon's gifts and tells him to bide his time until humankind knows how to use them. The Demon leaves. With a light heart, Rob concludes that he made the right decision.
Like some of Baum's adult novels, The Master Key features encounters with real historical figures of the period, such as King Edward of Britain, President Loubet of France, and the Duke of Orléans.
In 1901, the New York Times ran a brief notice calling it "a story for boys—all boys who love good wholesome adventure and exciting incident. It is a strange story of the electrical Demon, treating of powers that dominate all nature, and written for the eager, alert, and striving American boy."