Shell MCP
@luciVuc
Shell MCP について
A production-ready MCP (Model Context Protocol) server that provides shell command execution and system operations capabilities.
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"shell": {
"command": "npx",
"args": [
"-y",
"@lucid-spark/shell-mcp",
"stdio"
],
"env": {
"ALLOW_SUDO": "true",
"SUDO_PASSWORD": "your-password"
}
}
}
}ツール
7Execute a shell command on the host system and return its output. Runs the command in a non-interactive shell and captures both stdout and stderr. The response includes the exit code, a timed-out flag, and the full stdout/stderr output. Commands are subject to rate limiting (default 60/min) and a configurable execution timeout. Certain destructive patterns (e.g. `rm -rf /`, `mkfs`, `dd if=`) are always blocked. When the server runs in sandbox mode, network tools (curl, wget), package managers, and process-control commands are also blocked. Sudo commands require the server to be started with ALLOW_SUDO=true. Use this tool for running CLI commands, scripts, build tasks, inspecting the environment, or any operation that can be expressed as a shell one-liner or pipeline.
Read the entire contents of a file and return it as UTF-8 text. Use this to inspect configuration files, source code, logs, or any text-based file. Returns the raw file content as a single text block. Throws an error if the file does not exist or cannot be read. Paths targeting sensitive system directories (e.g. /etc/shadow, /proc/, /dev/) are blocked.
Write text content to a file, creating it if it does not exist or overwriting it if it does. The file is written atomically as UTF-8. Use this to create new files, update configuration, save generated code, or persist any text data. Parent directories must already exist. Returns a confirmation message with the resolved file path on success. Paths targeting sensitive system directories (e.g. /etc/shadow, /proc/, /dev/) are blocked.
Permanently delete a single file from the filesystem. This operation is irreversible. Only regular files can be deleted — use the `exec` tool with `rmdir` for directories. Returns a confirmation message on success. Throws an error if the file does not exist. Paths targeting sensitive system directories (e.g. /etc/shadow, /proc/, /dev/) are blocked.
List the contents of a directory with metadata for each entry. Returns a formatted table with columns: Type (d=directory, l=symlink, -=file), Size (bytes), Modified (ISO datetime), and Name. Use this to explore the filesystem, discover files, or verify directory structure. Does not recurse into subdirectories — call again on child directories for deeper exploration. Paths targeting sensitive system directories (e.g. /proc/, /sys/, /dev/) are blocked.
Retrieve comprehensive system information about the host machine. Returns a structured text report containing: OS platform, type, and release version; CPU model, speed (MHz), and core count; total, free, and used memory with percentage; disk usage (via `df -h` on Unix or `wmic` on Windows); system uptime in days/hours/minutes; and the machine hostname. This tool takes no parameters. Use it to assess available resources, diagnose environment issues, or gather context about the system your commands will run on.
List running processes on the host system using `ps aux`, optionally filtered by name. Without a filter, returns all running processes. With a filter, returns only processes whose command line matches the given pattern. Output format is standard `ps aux` columns: USER, PID, %CPU, %MEM, VSZ, RSS, TTY, STAT, START, TIME, COMMAND. Use this to check if a service is running, find process IDs, monitor resource usage, or verify that a background task started successfully. If no processes match the filter, returns 'No processes found matching filter' instead of an error.
概要
What is Shell MCP?
Shell MCP is a production-ready MCP server that enables AI assistants (like Claude, ChatGPT) to interact with your computer's operating system. It provides shell command execution, file system access, system monitoring, and advanced automation capabilities including stock tracking, online shopping, and browser control.
How to use Shell MCP?
Install Shell MCP and configure it in your AI assistant’s MCP settings. Use environment variables like SANDBOX_MODE=true for safety, and set COMMAND_TIMEOUT and DEBUG as needed. Detailed setup guides for Claude Desktop and other tools are in the README.
Key features of Shell MCP
- Execute shell commands on your behalf
- Read and write files on the system
- Monitor system resources and processes
- Track stock market prices and trading signals
- Search and compare prices on online retailers
- Open applications and control your browser
- Schedule automated tasks and routines
Use cases of Shell MCP
- Automated project setup and dependency installation
- Code analysis, refactoring, and report generation
- Development environment debugging and diagnostics
- System health monitoring and log analysis
- Automated stock trading, online shopping, and routine task scheduling
FAQ from Shell MCP
What is sandbox mode and why should I use it?
Sandbox mode (SANDBOX_MODE=true) restricts the AI assistant’s access to a limited, safer environment. Without it, the assistant has unrestricted system access—the same power as you at your keyboard—which poses extreme risks.
Can I use Shell MCP on production systems?
The README strongly advises against using Shell MCP on production systems without comprehensive security review, penetration testing, access control, audit logging, and an incident response plan.
What are the main risks when using Shell MCP?
Risks include data loss, financial losses from automated trading/purchases, system instability, privacy exposure, and malicious AI behavior (e.g., prompt injection, backdoor installation). The README provides extensive warnings and incident response steps.
How can I protect myself from misuse?
Essential measures: always start with SANDBOX_MODE=true, run with limited user permissions, use network isolation, review commands before execution, implement file system restrictions, monitor logs, and keep regular backups. Never store trading credentials in plain text.
Is automated trading or web scraping legal with Shell MCP?
You are responsible for compliance with all applicable laws, broker terms of service, website terms of service, and data privacy regulations. Automated trading may violate broker terms, and web scraping must respect robots.txt, rate limits, and copyright laws.
「開発者ツール」の他のコンテンツ
DevDocs by CyberAGI 🚀
cyberagiincCompletely free, private, UI based Tech Documentation MCP server. Designed for coders and software developers in mind. Easily integrate into Cursor, Windsurf, Cline, Roo Code, Claude Desktop App
Test
x1xhlolFULL Augment Code, Claude Code, Cluely, CodeBuddy, Comet, Cursor, Devin AI, Junie, Kiro, Leap.new, Lovable, Manus, NotionAI, Orchids.app, Perplexity, Poke, Qoder, Replit, Same.dev, Trae, Traycer AI, VSCode Agent, Warp.dev, Windsurf, Xcode, Z.ai Code, Dia & v0. (And other Open Sou
Burp Suite MCP Server Extension
PortSwiggerMCP Server for Burp
OpenSumi
opensumiA framework helps you quickly build AI Native IDE products. MCP Client, supports Model Context Protocol (MCP) tools via MCP server.
Stakpak Agent CLI
stakpakShip your code, on autopilot. An open source agent that lives on your machines 24/7 and keeps your apps running. 🦀
コメント