Integrations
Code coverage reporting integration shown by the codecov badge in the README header, displaying test coverage metrics for the project.
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
- Secure Command Execution: Only whitelisted commands can be executed
- Standard Input Support: Pass input to commands via stdin
- Comprehensive Output: Returns stdout, stderr, exit status, and execution time
- Shell Operator Safety: Validates commands after shell operators (; , &&, ||, |)
- Timeout Control: Set maximum execution time for commands
MCP client setting in your Claude.app
Published version
Local version
Configuration
Installation
Installing via Smithery
To install Shell Server for Claude Desktop automatically via Smithery:
Manual Installation
Installing via Smithery
To install Shell Server for Claude Desktop automatically via Smithery:
Usage
Starting the Server
The ALLOW_COMMANDS
(or its alias ALLOWED_COMMANDS
) environment variable specifies which commands are allowed to be executed. Commands can be separated by commas with optional spaces around them.
Valid formats for ALLOW_COMMANDS or ALLOWED_COMMANDS:
Request Format
Response Format
Successful response:
Error response:
Security
The server implements several security measures:
- Command Whitelisting: Only explicitly allowed commands can be executed
- Shell Operator Validation: Commands after shell operators (;, &&, ||, |) are also validated against the whitelist
- No Shell Injection: Commands are executed directly without shell interpretation
Development
Setting up Development Environment
- Clone the repository
- Install dependencies including test requirements
Running Tests
API Reference
Request Arguments
Field | Type | Required | Description |
---|---|---|---|
command | string[] | Yes | Command and its arguments as array elements |
stdin | string | No | Input to be passed to the command |
directory | string | No | Working directory for command execution |
timeout | integer | No | Maximum execution time in seconds |
Response Fields
Field | Type | Description |
---|---|---|
stdout | string | Standard output from the command |
stderr | string | Standard error output from the command |
status | integer | Exit status code |
execution_time | float | Time taken to execute (in seconds) |
error | string | Error message (only present if failed) |
Requirements
- Python 3.11 or higher
- mcp>=1.1.0
License
MIT License - See LICENSE file for details
You must be authenticated.
Tools
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
- MCP client setting in your Claude.app
- Usage
- Security
- Development
- API Reference
- Requirements
- License
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA secure MCP server for executing whitelisted shell commands with resource and timeout controls, designed for integration with Claude and other MCP-compatible LLMs.Last updated -201432TypeScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that provides secure command-line access to Windows systems, allowing MCP clients like Claude Desktop to safely execute commands in PowerShell, CMD, and Git Bash shells with configurable security controls.Last updated -9350105JavaScriptMIT License
- AsecurityAlicenseAqualityA secure terminal execution server that enables controlled command execution with security features and resource limits via the Model Context Protocol (MCP).Last updated -1121JavaScriptMIT License
- -securityAlicense-qualityAn MCP server that enables secure execution of shell commands across Windows, macOS, and Linux with built-in whitelisting and approval mechanisms for enhanced security.Last updated -13JavaScriptMIT License