The Golem and the Jinni by Helene Wecker. A masterless golem who can pass for a human woman (albeit a tall one) and a jinni freed from captivity but bound to human form find themselves in 1899 New York City and cross paths with a Syrian tinsmith, a Jewish social worker, a rich ingenue, a wise rabbi, a cursed ice cream vendor, and a mad wizard. Not so much magical realism as it is realistic fantasy, the story is really one of exploring desire, regret, the source of one's identity and the nature of love all while providing enough suspense, danger, and mystery to make it a page-turner.
Although I just discovered it, this book came out ten years ago; I even more recently found out that Wecker published a sequel two years ago. That one will certainly be added to the list.