
Shellquote Mcp
io.github.MukundaKatta由 GitHub 帳號 MukundaKatta 發布v0.1.0更新於 Oct 24, 2026
Safe shell argument escaping for bash, cmd.exe, and PowerShell.
概覽
本機 MCP 伺服器,為 bash、cmd.exe 與 PowerShell 轉義 shell 參數,讓助理產生的指令能正確處理引號、空格與變數。
- 可以做什麼
- 為 bash/sh/zsh 轉義單一參數,抑制萬用字元展開與變數插值,並將參數清單轉義後以空格連接。為 Windows cmd.exe 轉義單一參數,並註明延遲展開方面的限制。將單一參數轉義為 PowerShell 單引號字串。回傳 shell 可原樣接受的字符串,避免引號、空格、反斜線與 $VAR 造成指令出錯。
- 適用情境
- 當助理需要撰寫包含使用者輸入文字、含空格檔名或字面美元符號的 shell 指令,並希望先正確轉義參數時適用。它只是輔助工具,不負責執行指令。
- 執行需求
- 以 stdio 本機程序執行,來自 npm 套件 @mukundakatta/shellquote-mcp,通常以 npx 啟動,因此需要 Node.js 與 npm。未宣告驗證、環境變數或標頭。僅支援桌面用戶端。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Shellquote Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@mukundakatta/shellquote-mcp
MCP server for safe shell argument escaping. Stops LLM-generated shell commands from breaking (or worse) on quotes, spaces, $VAR interpolation, and backslashes.
Tools
quote_bash(arg)— single-quote escape for bash/sh/zsh. Suppresses all metacharacter expansion.quote_bash_argv(args)— escape a list and join with spaces.quote_cmd(arg)— Windows cmd.exe (caveat: cmd has unfixable delayed-expansion corners).quote_powershell(arg)— single-quoted PS string.
Why this exists
LLMs constantly get shell escaping wrong:
bash -c "echo $HOME"interpolates the variable instead of passing it literalcmd /c "del file.txt"breaks if the filename has spaces- Embedded single quotes in bash require the awkward
'\''dance the LLM forgets
This tool returns a string the shell will accept verbatim, with no metacharacter surprises.
Install — Claude Desktop
Same shape for Cursor / Cline / Windsurf / Zed.
License
MIT OR Apache-2.0.
來源:packages/shellquote-mcp/README.md,提交 6fad5bb
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分