During the battle with the changelings, a trapped Discord manages an undirected spell that reaches across universes to bring an agent of chaos to Equestria. What's brought back more than qualifies.
Steam! Gears! SCIENCE! A very confused Spark! And, eventually, really good coffee.
Here comes Agatha Heterodyne--MARE GENIUS!