At the New York Comic Con, the cast (and crew) were quoted as saying that this episode, "the one with the fairy tales was their favorite episode" to make in the first season. And their "second favorite was the Christmas episode".
The scene where the Naked Mayor runs up to the sheriff and the librarians shows a city hall building; this is the actual City Hall of the City of Estacada, where the filming took place.
The city of Bremen, Germany, is at the end of the Märchenstraße (Fairy Tale Road), with the town of Hanau, Germany, the start point. Hanau is where the Brothers Grimm were born, and following the Märchenstraße north to Bremen would take you through dozens of villages, towns and cities where the Brothers Grimm either lived or worked and collected their stories, including Bremen, the name of the fictional town where this episode takes place. All of the stories the Brothers Grimm collected take place in locations (in the original German at least) along this route.
Ezekiel teaches Jamie how to pick a lock. Parker, the thief from Leverage (2008), also bonds with children by teaching them how to pick locks (i.e., in The Wedding Job (2009)). Leverage and the Librarians were both created by the same team. Beth Riesgraf (Parker) also appears in this series as a very different character.
This episode was directed by Jonathan Frakes, who starred in Star Trek: The Next Generation (1987) and features Rene Auberjonois, who starred in Star Trek: Deep Space Nine (1993).