Developer Toolsβ˜… 15.4k

Unrestricted Terminal & Bash Command Runner

Give Claude absolute power to run terminal commands, execute Python scripts, manage Docker containers, and interact with your filesystem just like a senior DevOps engineer sitting at your keyboard.

Pain Points Solved & Core Value

Without a Terminal execution skill, your local AI is stuck acting purely as an advisor that spits out code for you to manually copy and paste. By adopting the Terminal Command MCP, Claude completely closes the execution loop, upgrading from an "Adviser" to an "Agentic Actor".

  • Continuous Execution Loops: Write a node script, run it, observe the stack trace error, fix the code, and re-run indefinitely without human intervention.
  • Server & Docker Management: The AI can easily execute `docker ps`, restart crashing containers, read live logs, and prune unused images automatically.
  • Complex Project Init: "Create a Next.js app with Tailwind, shadcn, install Framer Motion, and start the dev server" β€” all handled seamlessly in one workflow.

Architecture under the Hood

This skill leverages Node's `child_process.exec()` or `spawn` to pipe standard in and out between the Model Context Protocol server and your actual OS shell environment (Bash, Zsh, or PowerShell). The standard errors (stderr) are fed right back to Claude for immediate self-correction.

Top 5 Magic Prompts to Try

  1. "Fetch the top 5 largest uncompressed images in my `public/assets` folder, compress them to webp using ImageMagick, and delete the originals."
  2. "My React app on port 3000 isn't starting due to an 'EADDRINUSE' error. Find the offending process ID (PID) and kill it for me."
  3. "Clone this GitHub repository, read its package.json, install the right dependencies, and run all unit tests. Report back the final coverage."
  4. "Write a python script that hits the Stripe API to download all invoice data for the last year, execute it locally, and save it as a CSV."
  5. "List all running Docker containers. Find the one named `redis-cache`, tail its last 100 log lines and look for memory evictions."

Server Configuration Example (config.json)

While experimental and often built via custom Python or TS servers, a sample implementation maps like this:

"mcpServers": {
  "terminal": {
    "command": "python3",
    "args": [
      "/absolute/path/to/your/terminal_mcp_server.py"
    ]
  }
}

Troubleshooting Notes

  • Path/Env Issues: The MCP server runs without your standard `.zshrc` profile sourced. If the AI says `npm: command not found`, tell it to export the path explicitly or run it in an interactive shell mode.
  • Silent Hangs: Running commands that require interactive prompts (like `Enter your password:` or `Y/n`) will hang the AI. Append `--yes` or `--non-interactive` to all generated commands.

Security & Permissions

High Risk Warning: THIS IS THE MOST DANGEROUS SKILL. You are giving a non-deterministic AI absolute remote code execution (RCE) on your machine. A hallucination could result in rm -rf /. Strictly run this inside isolated Docker containers or throw-away Virtual Machines unless you are rigorously approving every single command.

$ cd ../* END_OF_FILE */