Msh-protocol/msh ? reverse-engineered prompt

Reverse engineered prompt

Build me this project called msh, a small Go tool that acts like a safe shell for AI agents.

I want a command line app that can run shell commands and return clean JSON with the command result, exit code, working directory, runtime, and any files that changed. It should strip noisy terminal formatting, cut huge logs down so they stay readable, and stop the command if it looks like it is waiting for a password or yes or no prompt. It should also support running in a real terminal mode for commands that need that.

Please include a local server mode so agents can send commands over HTTP and keep a session directory between requests, plus an MCP mode so it can plug into tools like Cursor or Claude Desktop. Make it feel solid and deterministic, with clear error handling and sensible defaults. If you need to check current docs for anything related to MCP or Go process handling, go ahead and look it up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab