A team of German physicists has just built the smallest working heat engine. It uses a single Calcium atom, and runs in four strokes like your car's combustion engine. It is about as efficient as your car at transforming the changing temperature into mechanical energy. http://www.popularmechanics.com/science/energy/a20406/single-atom-engine-works/
It does not, of course, change "temperature" into mechanical energy - it uses a difference in temperature, and the resulting heat flow, to convert heat energy to mechanical.