I'd like to be able to play Minecraft on my MacBook when there is no room for a mouse (eg on a train). I know that there are apps that let you use an iPhone as a game controller, but they seem aimed at playing classic games on an emulator. Is there an app that can effectively replace the mouse+keyboard combo for controlling a 3D first-person game?
You might have already looked into this, though I didn't see it mentioned by name so I'll throw it out here anyway. Joypad for iOS will almost do what you want, but doesn't have mouse support. The developer posted a concept video showing him controlling Minecraft by tiling the iPhone to act as mouse input, but that was almost three months ago and the app hasn't been updated since. Might be worth keeping an eye on, though I don't know how practical tilting your phone around on the train would be, assuming it ever comes out.
That all said, have you considered using a virtual trackpad app for your phone? Something like Rowmote or TouchPad? This way, you could keep your left hand on the WASD, and just hold the phone in your hand and use your thumb to manipulate the trackpad, akin to an analog stick. I imagine it might be a little awkward, but no less so than trying to do everything on your phone.
Addendum: I originally included links to the apps in question, but as a new user I can't post more than two links. Rather than risk any showing of bias, I just removed the appstore links for the apps. Should be easy enough to find, though.