After a lot of tearing my hair out, I have now got a connection to the MPD server which doesn’t drop out and a stable, high quality music server pulling the music from my NAS – with a next button for the odd misstep on the playlist. Here is the code for your delectation.
Rename it to button.py and run it using python button.py. Check this post for the build details.