The Master Computer was a sentient computer on Beta Omicron Delta III. It was the main control node for systems that manufactured objects and trans-droids to fulfill fantasies on the Amusement Park Planet. (TAS - Log Three novelization: Once Upon a Planet)
The Master Computer was overseen by the Caretaker. It was highly innovative, efficient at recycling cellular components, and came to develop a sense of humor. (TOS - Strange New Worlds I short story: "The Girl Who Controlled Gene Kelly's Feet")
Prior to 2269, the Caretaker died and was buried. The Master Computer subsequently began to rebel from its directive to fulfill the fantasies of others.
In 2269, it attempted to commandeer the USS Enterprise, but James T. Kirk, Spock and Nyota Uhura showed it how to take better advantage of its own circumstances. It agreed to maintain operations, excited with the notion of having stimulating intellectual conversations with visitors. (TAS episode & Log Three novelization: Once Upon a Planet, TOS - Strange New Worlds I short story: "The Girl Who Controlled Gene Kelly's Feet")
During that visit, the Master Computer offered to let Yeoman Minnie Moskowitz stay on the planet and live out her fantasy of dancing like Gene Kelly. An android of Moskowitz returned to the Enterprise.
In 2270, during the starship's next shore leave visit, both Moskowitzes ran into each other in front of their psychiatrist. The doctor subsequently met with the Master Computer, who tempted her with a similar offer. (TOS - Strange New Worlds I short story: "The Girl Who Controlled Gene Kelly's Feet")