Overview
MCP Shell Server is a secure shell command execution server that implements the Model Context Protocol (MCP), allowing for the remote execution of whitelisted shell commands with support for standard input.
To use the MCP Shell Server, start the server with the allowed commands specified in the environment variable, and send requests in JSON format to execute commands remotely.
- Secure command execution with whitelisting - Support for standard input (stdin) - Comprehensive output including stdout, stderr, exit status, and execution time - Shell operator safety with command validation - Timeout control for command execution
- Remote execution of system commands in a controlled environment
- Integration with applications requiring secure command execution
- Development and testing of command-line tools in a safe manner
Add to your AI client
Use these steps to connect MCP Shell Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"tumf-mcp-shell-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-tumf-mcp-shell-server-mcp-mirror"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"tumf-mcp-shell-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-tumf-mcp-shell-server-mcp-mirror"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"tumf-mcp-shell-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-tumf-mcp-shell-server-mcp-mirror"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"tumf-mcp-shell-server-mcp-mirror": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-tumf-mcp-shell-server-mcp-mirror"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"tumf-mcp-shell-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-tumf-mcp-shell-server-mcp-mirror"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"tumf-mcp-shell-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-tumf-mcp-shell-server-mcp-mirror"
]
}
}
}FAQ
What commands can be executed?
Only commands specified in the ALLOW_COMMANDS environment variable can be executed.
How do I install MCP Shell Server?
You can install it using pip: `pip install mcp-shell-server`.
Is there a way to limit command execution time?
Yes, you can set a timeout for command execution in the request.