MCP Shell Server
A secure shell command execution server implementing the Model Context Protocol (MCP). This server allows remote execution of whitelisted shell commands with support for stdin input.
Features
- Argv-based Command Execution: Allowed commands run via subprocess argv without shell-string interpretation
- Standard Input Support: Pass input to commands via stdin
- Comprehensive Output: Returns stdout, stderr, exit status, and execution time
- Safe Pipeline Support: Pipelines preserve and validate argv segments instead of invoking a shell
- Execution Limits: Server-side default timeout, maximum timeout, and output byte caps are enforced
- Contained Redirection:
<,>, and>>targets must stay inside the requested working directory - Minimal Child Environment: Child processes receive a small allowlisted environment instead of inheriting all server secrets
- Structured Audit Logging: Success, rejection, timeout, output-cap, and process-error outcomes are logged with redaction







