In the place of today’s Czech Museum of Music and the little square in front of it there most likely stood a freehold estate with its own Romanesque church, which later provided the foundations for the convent of the Dominican nuns, also known as Magdalenites, documented in 1329. This etermined that the church remained dedicated to St. Mary Magdalene. The original church was renovated in the Gothic style in the 14th century.
In June 1420, the whole convent, together with the church, was destroyed by the Hussites. The land was divided among the Hussite burghers of Prague’s Lesser Town. In 1574, the property was bought by the Metropolitan Chapter in Prague, which in 1604 passed it on to the Dominicans, who moved here from the Old Town after the arrival of the Jesuits.
To be able to build a new church, the Dominicans needed to find a wealthy donor. They found one in their neighbour, Karel Alexander Michna of Vacínov. His father, Pavel, had grown incredibly rich as General Quartermaster and supplier for the army of Albrecht von Wallenstein, in addition to many other dubious trades during the Thirty Years’ War. In 1627 he was promoted to the rank of Prince of the Holy Roman Empire. The large family coat-of-arms decorates the frontage of the cupola of the building. The church was to become the family‘s tomb.
Franceso Caratti (1615–1677), the leading Prague architect of the early Czech Baroque, was chosen to be the master builder of the new church. From Vienna, he brought to Prague new principles of Italian architecture. The best known of his buildings in Prague is the Czernin Palace. For Michna of Vacínov he rebuilt the nearby palace (Tyrš House). For lack of space, the church is oriented in an unusual way, north to south. The foundation stone was laid in 1654. However, the construction was prolonged, and it was very nearly not finished at all. In 1679 the organ was installed here, the largest in Prague at that time, and in 1709 the finished church was consecrated.
The reforms of Joseph II led to the dissolution of the Dominican convent in 1783. After attempts to use the building for industrial purposes, and its partial conversion, in which the front towers were removed, the building was acquired by the Czech Governorate, which had a central post office built here using the design by J. K. Zoebel, providing not only the shipment of letters, but also the transportation of people by postal carriages.