This is pretty much entirely why I built https://github.com/SteffenBlake/cli-mcp-mapper
I map bespoke CLI commands, with parameters, to MCP tools, and then 100% just turn off the ability to invoke the CLI itself entirely.
That way it can only explicitly invoke the whitelisted commands I have granted it access to run, with only the parameters I have allowed it to.
So for example I can explicitly expose git commit, status, stage, unstage, but everything else git related is not available, not even git push or pull.
This substantially seems to help prevent the LLM from going off the rails on stupid CLI nonsense, like when it starts cating files instead of just fucking reading them.