Design Engineer Logo
Visit Repo
Open Graph preview

MCP Shell

Execute a secure shell in Claude Desktop using the Model Context Protocol

Site favicon
⚡️ System Operation

Overview

mcp-shell

Description:
Secure shell command execution server for Claude Desktop integration

Category: System Integration & Security

Overview: A robust Node.js server enabling secure shell command execution through a controlled environment. The implementation focuses on security with comprehensive command blacklisting and validation features.

Key Features:

  • Command blacklisting protection
  • Pre-execution validation
  • Standard I/O based transport
  • Comprehensive error handling
  • Single tool: run_command

Installation:

npx mcp-shell
# For Claude Desktop configuration
npx mcp-shell config

Configuration:

{
  "mcp-shell": {
    "command": "npx",
    "args": ["-y", "mcp-shell"],
    "env": {
      "SHELL_PATH": "/bin/bash"
    }
  }
}

Security Measures:

  • Blocks dangerous system commands
  • Prevents critical system modifications
  • Protects against filesystem destruction
  • Blocks privilege escalation attempts

Blacklisted Command Categories:

  • File System Destruction (rm, rmdir)
  • Disk/Filesystem Operations
  • Permission/Ownership Modifications
  • Privilege Escalation
  • System Control Operations
  • Code Execution
  • System Communication

Error Handling:

  • Command validation errors
  • Execution failures
  • Protocol errors
  • Graceful shutdown procedures

The server maintains a balance between functionality and security, making it suitable for controlled AI model interactions with system shell commands.