io.github.MukundaKatta/shellquote-mcp (MCP)
This MCP server provides safe shell argument escaping for bash, cmd.exe, and PowerShell. Its purpose is to prevent LLM-generated shell commands from breaking on quotes, spaces, $VAR interpolation, and backslashes. It exposes tools for quoting individual arguments and, for bash, quoting and joining argument lists.
🛠️ Key Features
quote_bash(arg): single-quote escape for bash/sh/zsh; suppresses metacharacter expansionquote_bash_argv(args): escapes a list of arguments and joins with spacesquote_cmd(arg): Windows cmd.exe quoting, noting delayed-expansion corner casesquote_powershell(arg): single-quoted PowerShell string quoting
🚀 Use Cases
- Escaping arguments to keep generated shell commands from failing due to quotes/spaces/backslashes
- Preventing unwanted
$VARinterpolation in shell contexts
⚡ Developer Benefits
- Dedicated escaping per shell: bash, cmd.exe, and PowerShell
- Supports both single-argument quoting and bash argv quoting
⚠️ Limitations
quote_cmd(arg)includes a stated caveat: cmd.exe has “unfixable delayed-expansion corners.”