I've replaced arduino and ethernet shield with ESP-12 as well. I'm not using MQTT but if this will help here is more about the change http://www.esp8266.com/viewtopic.php?f=11&t=3992, there is link to source codes too. You may need to change some code but it depends on what libraries etc. your sketch is using. I had to swap varspeedservo with standard servo library.
I've replaced arduino and ethernet shield with ESP-12 as well. I'm not using MQTT but if this will help here is more about the change http://www.esp8266.com/viewtopic.php?f=11&t=3992, there is link to source codes too. You may need to change some code but it depends on what libraries etc. your sketch is using. I had to swap varspeedservo with standard servo library.