The Magic Flute is a celebrated opera composed in 1791 by Wolfgang Amadeus Mozart. Mozart employed a libretto written by his close colleague Emanuel Schikaneder, the director of the Theater auf der Wieden at which the opera premiered in the same year. (He also played the role of Papageno). Grout and Williams describe the libretto thus:
Schikaneder, a kind of literary magpie, filched characters, scenes, incidents, and situations from others' plays and novels and with Mozart's assistance organized them into a libretto that ranges all the way from buffoonery to high solemnity, from childish faerie to sublime human aspiration – in short from the circus to the temple, but never neglecting an opportunity for effective theater along the way.
Sources
The sources for the work fall into (at least) four categories: works of literature, earlier productions of Schikaneder's theater company, Freemasonry, and the 18th-century tradition of popular theater in Vienna.
Literary sources
In work with D. D. Roy Owen, Peter Branscombe notes strong resemblances between the opening scenes of The Magic Flute and episodes of the medieval romance Yvain by Chrétien de Troyes (c. 1177). This work attracted attention in Mozart and Schikaneder's time and appeared in a 1786–7 German translation by K. J. Michaeler, a member of the same Masonic lodge as Mozart. Yvain offers the following possible models: an imperiled hero in a desolate countryside, carrying a bow and rendered unconscious, is rescued by three ladies, who bring him to a high-born mistress who is in need of a hero's services. In another scene of Yvain (which Owen and Branscombe suggest Schikaneder conflated with the first), the hero encounters a sort of wild man in dress so outlandish that he doubts his humanity; like Papageno, this wild man must assure the hero that he is human. A major source appears to have been the 1731 novel Life of Sethos by the French author Jean Terrasson. The work appeared in a German translation by Matthias Claudius in 1777–8. Branscombe sees this a possible source for the serpent that appears in the opening scene, for the trials of water and fire, for the words sung by the Two Armed Men, and for the text of Sarastro's hymn "O Isis und Osiris." The connection is sufficiently close that Branscombe even suggests that modern directors attempting a new production should consult Sethos carefully for the hints it provides concerning what Mozart and Schikaneder would have wanted in terms of production and stage design. The long essay "Über die Mysterien der Ägypter" ("On the mysteries of the Egyptians"), published by the Vienna scientist and Freemason Ignaz von Born in the first issue of the Masonic journal Journal für Freymaurer in 1784. This work describes among other things the worship of Isis and Osiris, the gods to whom Sarastro and his priests pray. It also is a possible source for the passages of overt misogyny that often perturb modern readers of Schikaneder's libretto.
The series of three books entitled Dschinnestan published by Christoph Martin Wieland in 1786 to 1789 contains a total of 19 fairy tales. Some of these are retold stories, others were made up by Wieland or by his collaborator J. A. Liebeskind. Various of these stories – which were being separately published in Vienna at the time The Magic Flute was being written – are held to have influenced Schikaneder's Magic Flute libretto. "Adis und Dahy" contains a model for the character Monostatos; he is a black slave who watches over the heroine and is later punished by his master. "Neangir und seine Brüder" ("Neangir and his brothers") provides a model for Tamino's famous aria "Dies Bildnis ist bezaubernd schön": a hero falls in love with a woman merely by seeing her portrait and sets off to rescue her. As Branscombe notes, this situation is common enough in literature, but "Neangir" contains many of the actual words used in the text Schikaneder wrote for this aria. "Die klugen Knaben" ("The clever boys") is perhaps the model for the Three Boys. They give wise advice to characters in the story, including a somewhat more verbose version of Schikaneder's "Sei standhaft, duldsam, und verschwiegen" ("Be steadfast, resolute, and discreet"). They also descend from the skies "on a white shining cloud to prevent a tragic outcome", perhaps the model for the Three Boys' interventions to prevent the intended suicides of Pamina and Papageno. "Lulu, oder die Zauberflöte" ("Lulu, or the Magic Flute"). Branscombe takes the view that this story provided little more than the title of the opera.