I recently contacted the author of a program called "ToolDaemon", which lets you telnet to a Mac and run commands via MPW ToolServer. I asked him if he'd be willing to open source the project, since it was more or less obsolete, and he agreed.
I just got an e-mail from him saying he had posted it to GitHub:
https://github.com/fblondiau/ToolDaemon
Happy hacking!