studiomeyer-io avatar

MCP stdio ShellGuard

studiomeyer-io/mcp-stdio-shellguard

Drop-in defense against shell injection attacks in MCP stdio servers. Wraps child_process.exec and spawn with an allowlist registry, sandbox profiles (strict/standard/permissive with cgroup-v2 support), and replay detection. Ships three pieces: guardExec/guardSpawn functions you call from your own server, an AST audit CLI (mcp-shellguard-audit) that scans TypeScript/JavaScript for 12 anti-patterns from template literal injection to missing timeouts, and a reference server with 8 tools. Built after the Ox-Security disclosure of 200k vulnerable MCP servers. Reach for this if you're building MCP tools that shell out to git, docker, or system commands and want defense in depth before user input hits exec.

tools
8
transport
STDIO
last updated
Nov 1, 2026

Tools

8 tools

Public tool metadata for what this MCP can expose to an agent.

guard_execDefended `child_process.exec`. Forces args[] vector, allowlist + sandbox + replay.

Defended `child_process.exec`. Forces args[] vector, allowlist + sandbox + replay.

No parameter schema in public metadata yet.

guard_spawnDefended `child_process.spawn`. Returns SHA-256 hashes of stdout/stderr instead of full bodies. Hard-rejects `shell:true`.

Defended `child_process.spawn`. Returns SHA-256 hashes of stdout/stderr instead of full bodies. Hard-rejects `shell:true`.

No parameter schema in public metadata yet.

register_allowlistRegister a tool name with executable + args regex. Without registration the default-deny applies.

Register a tool name with executable + args regex. Without registration the default-deny applies.

No parameter schema in public metadata yet.

audit_sourceScan a TS/JS path for shell-injection anti-patterns. Returns `AuditFinding[]` + summary.

Scan a TS/JS path for shell-injection anti-patterns. Returns `AuditFinding[]` + summary.

No parameter schema in public metadata yet.

audit_reportFormat an audit result as markdown / json / SARIF 2.1.0.

Format an audit result as markdown / json / SARIF 2.1.0.

No parameter schema in public metadata yet.

replay_checkCompute canonical SHA-256 hash for an invocation and report whether it's already in the replay window.

Compute canonical SHA-256 hash for an invocation and report whether it's already in the replay window.

No parameter schema in public metadata yet.

sandbox_statusReport active sandbox profile + concrete limits + cgroup-v2 active flag.

Report active sandbox profile + concrete limits + cgroup-v2 active flag.

No parameter schema in public metadata yet.

trust_tierDerive LOW/MEDIUM/HIGH/CRITICAL tier for a registered tool plus improvement hints.

Derive LOW/MEDIUM/HIGH/CRITICAL tier for a registered tool plus improvement hints.

No parameter schema in public metadata yet.

Sponsors

Readme

Part of the StudioMeyer MCP Stack — Built in Mallorca 🌴 · ⭐ if you use it

mcp-stdio-shellguard


View the full README on GitHub

Details

Repository
github.com/studiomeyer-io/mcp-stdio-shellguard
Category
Developer Tools
Package
mcp-stdio-shellguard
Transport
STDIO
Registry
MCP registry, active

More from studiomeyer-io

Related Developer Tools MCP servers

View all
1radiovisual avatarZoekt Mcpradiovisual/zoekt-mcpFast indexed code search for AI agents, powered by Sourcegraph Zoekt.0stars
2unbearabledev avatarIAC Audit Packunbearabledev/iac-audit-packFour IaC audits in one call: Compose, Dockerfile, GitHub Actions, Kubernetes. 131 checks.0stars
3ahmedkhaleel2004 avatarGitDiagramahmedkhaleel2004/gitdiagramArchitecture diagrams, explanations and Mermaid source for public GitHub repositories.18.8Kstars
4repowise-dev avatarRepowiserepowise-dev/repowiseCodebase intelligence for AI coding agents — graph, git history, docs, decisions, code health.8.1Kstars
5pollinations avatarConnectorspollinations/pollinationsRead Gmail, read and commit to GitHub, update Sheets, and post to Slack through Composio.5.3Kstars
6pollinations avatarComputerpollinations/pollinationsA private persistent computer: files that survive between runs, a bash shell and JavaScript.5.3Kstars