Dear created Mary out of brass and leather while consumed by grief for his brother, who was killed during World War One. However, he could not determine how to make her truly come alive until Sergeant Fox gave him a clockwork brain designed by the God-Machine. Once the brain was installed, Mary was greatly transformed: she appeared from the outside to be an adult human woman, except for the large keyhole in her chest where her mechanism needed to be wound. She was, however, a complete blank slate, and Dear had to educate her, starting with teaching her to speak.
Mary was infatuated with Dear, but had little emotional maturity or self-control. After she lashed out at him violent, Dear became afraid of her; when she realized he'd abandoned her, she destroyed his house and then went looking for him in London. She reached the city during the Blitz and at some point became trapped in the rubble of a destroyed house. An angel, likely Sergeant Fox, rescued and repaired her, then kept her sedated in a facility until 2012.
In that year, the angel told Mary to go find William. She found Jon instead, but believed him to simply be an amnesiac version of William, and began stalking him. She may have killed his cat. Around August 13, Stephen brought Jon and Mary back to the London facility, where Sergeant Fox removed Mary's brain and gave it to Jon. At that moment she was transformed back into a doll made of leather and brass.