Shellquote Mcp

io.github.MukundaKatta由 GitHub 账号 MukundaKatta 发布v0.1.0更新于 Oct 24, 2026

Safe shell argument escaping for bash, cmd.exe, and PowerShell.

已验证STDIO仅桌面开发者工具

概览

AI 生成的概览

本地 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。未声明认证、环境变量或请求头。仅支持桌面客户端。
安装前请注意
它只生成转义后的字符串,不执行命令,实际执行仍由助手决定。README 指出 cmd.exe 存在无法修复的延迟展开问题,因此 cmd 转义并非完全可靠。在用于删除等破坏性命令前应先核对输出。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Shellquote Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

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 literal
  • cmd /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

json
{  "mcpServers": {    "shellquote": { "command": "npx", "args": ["-y", "@mukundakatta/shellquote-mcp"] }  }}

Same shape for Cursor / Cline / Windsurf / Zed.

License

MIT OR Apache-2.0.

来源:packages/shellquote-mcp/README.md,提交 6fad5bb

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分