MCP Shell Server
About
Secure MCP server for whitelisted shell command execution with stdin, argv pipelines, timeouts, and structured audit logging.
Details
- License
- Apache-2.0 license
Explore
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
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MCP Shell ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Configuration
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"shell": {
"command": "uv",
"args": [
"--directory",
".",
"run",
"mcp-shell-server"
],
"env": {
"ALLOW_COMMANDS": "ls,cat,pwd,grep,wc,touch,find"
}
},
}
}
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp shell server": {
"mcp-shell-server": {
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"mcp-shell-server",
"--client",
"claude"
]
}
}
}
}
McpServers
{
"mcp-shell-server": {
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"mcp-shell-server",
"--client",
"claude"
]
}
}
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.
<a href="https://glama.ai/mcp/servers/rt2d4pbn22"></a>
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
MCP client setting in your Claude.app
Published version
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"shell": {
"command": "uvx",
"args": [
"mcp-shell-server"
],
"env": {
"ALLOW_COMMANDS": "ls,cat,pwd,grep,wc,touch,find"
}
},
}
}
Local version
Configuration
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"shell": {
"command": "uv",
"args": [
"--directory",
".",
"run",
"mcp-shell-server"
],
"env": {
"ALLOW_COMMANDS": "ls,cat,pwd,grep,wc,touch,find"
}
},
}
}
Installation
Installing via Smithery
To install Shell Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install mcp-shell-server --client claude
Manual Installation
pip install mcp-shell-server
Usage
Starting the Server
```bash
ALLOW_COMMANDS="ls,cat,echo" uvx mcp-shell-server
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




