mcpField
S
shellquote-mcp

shellquote-mcp

Local
github.com/MukundaKattaDeveloper Tools0Updated 20w ago

About shellquote-mcp

shellquote-mcp is an MCP server that escapes shell arguments for bash, cmd.exe, and PowerShell. It is intended for agents and developers generating commands that must preserve argument text across shell parsing.

Key features

  1. 01Quote arguments for bash, sh, and zsh
  2. 02Escape and join bash argument lists
  3. 03Quote arguments for cmd.exe
  4. 04Quote strings for PowerShell

Use cases

  1. 01Pass arguments containing spaces safely
  2. 02Preserve literal dollar signs and backslashes
  3. 03Handle embedded single quotes in bash
  4. 04Prepare arguments for Windows shells

MCP support

Exposes shell-quoting tools to MCP clients for bash, cmd.exe, and PowerShell arguments.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"mukundakatta-shellquote": {
"command": "npx",
"args": [
"-y",
"@mukundakatta/shellquote-mcp"
]
}
}
}
Run commandnpx -y @mukundakatta/shellquote-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@mukundakatta/shellquote-mcp0.1.0

Tools

4

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
argstringYes

Details

From the project 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

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

Same shape for Cursor / Cline / Windsurf / Zed.

License

MIT OR Apache-2.0.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.