Skip to content
MCP server

MCP stdio ShellGuard

Guard child_process calls in MCP stdio servers and audit source for shell injection

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI
Runs
Locally
Version
0.1.3
Listing updated
today

Similar MCP servers

About MCP stdio ShellGuard

MCP stdio ShellGuard is an open-source MCP server for security. It runs locally on your machine and is started by your AI client.

This bundle targets the class of remote-code-execution bugs where a stdio MCP server passes unsanitised input to a shell. It has three layers you can adopt separately: guardExec and guardSpawn wrappers with a default-deny allowlist, sandbox profiles and replay detection; an AST audit CLI named mcp-shellguard-audit; and a reference MCP server with 8 tools.

The audit scans TypeScript and JavaScript for 12 anti-patterns, from critical ones such as exec with a template literal to low ones like a missing timeout. It resolves renamed child_process bindings, so aliases are caught, and it can output SARIF 2.1.0 and gate CI by severity.

Sandbox profiles are strict (5 s), standard (30 s) and permissive (5 min), with output and file-descriptor limits; callers can tighten but not widen them. Trust tiers run from low to critical depending on allowlist, argument patterns, sandbox and replay protection.

Install

Run in a terminal

claude mcp add stdio-shellguard -- npx -y mcp-stdio-shellguard

Add to claude_desktop_config.json

{
  "mcpServers": {
    "stdio-shellguard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-stdio-shellguard"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "stdio-shellguard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-stdio-shellguard"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "stdio-shellguard": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-stdio-shellguard"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "stdio-shellguard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-stdio-shellguard"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "stdio-shellguard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-stdio-shellguard"
      ]
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Tools this server provides (8)

Taken from the project documentation; the running server may differ.

guard_exec
Defended child_process.exec with allowlist, sandbox and replay checks.
guard_spawn
Defended spawn returning SHA-256 hashes of output.
register_allowlist
Registers a tool name with executable and argument regexes.
audit_source
Scans a path for shell-injection patterns.
audit_report
Formats an audit as markdown, JSON or SARIF.
replay_check
Hashes an invocation and checks the replay window.
sandbox_status
Reports the active sandbox profile and limits.
trust_tier
Derives a tool's trust tier with hints.

What it does

Guarded exec and spawn
Default-deny allowlist, sandbox and replay window.
AST audit CLI
Scans source for 12 shell-injection anti-patterns.
SARIF output
Exports findings for CI gating.
Sandbox profiles
Strict, standard and permissive limits.
Trust tiers
Rates each tool low to critical.
Alias resolution
Catches renamed child_process imports.

Good for

  • Audit an MCP server's source for unsafe shell calls
  • Replace raw exec calls with an allowlisted wrapper
  • Fail CI on high-severity findings
  • Rate how well a registered tool is constrained

Pricing

Open source

MCP stdio ShellGuard FAQ

How do I run the audit?

`npx -y -p mcp-stdio-shellguard mcp-shellguard-audit scan ./src`.

Does the guard allow shell:true?

guard_spawn hard-rejects shell true.

Which Node versions?

Node 20 or newer.

Licence?

MIT.

Is MCP stdio ShellGuard free?

Yes. MCP stdio ShellGuard is open source, so you can use and self-host it for free.

How do I add MCP stdio ShellGuard to Claude Code?

Run this command in your terminal: claude mcp add stdio-shellguard -- npx -y mcp-stdio-shellguard

What are the best alternatives to MCP stdio ShellGuard?

The closest alternatives to MCP stdio ShellGuard are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers