Shell Execution MCP Server
@samihalawa
Shell Execution MCP Server for Claude and other MCP-compatible AI assistants
Overview
What is Shell Execution MCP Server?
A Model Context Protocol (MCP) server that provides persistent shell command execution capabilities for Claude and other MCP-compatible AI assistants.
How to use Shell Execution MCP Server?
Install via git clone and npm install. Start the server with npm start. Add the server to your MCP configuration as a JSON entry with the command pointing to Node.js and the server.js file. Available tools: execute-command (with parameters command, runInBackground, timeoutMs) and reset-shell (no parameters).
Key features of Shell Execution MCP Server
- Persistent shell session across commands
- Background execution with process management
- Cross-platform support (macOS, Linux, Windows)
- Configurable command execution timeout
- Shell session reset capability
Use cases of Shell Execution MCP Server
- Maintain working directory and environment variables across multiple commands
- Run long‑running tasks in the background while continuing other operations
- Automate system administration tasks via an MCP‑compatible AI assistant
FAQ from Shell Execution MCP Server
What are the system requirements?
Node.js 14 or later. Compatible with Claude Desktop, Cursor, and other MCP‑compatible applications.
Does the server work on Windows?
Yes, it works on Windows with the appropriate shell. Use the Windows‑specific configuration format with absolute paths.
How do I prevent commands from hanging?
Use the timeoutMs parameter to set a custom timeout (default 30 seconds). The server provides timeout control as a built-in feature.
How can I reset the shell session?
Call the reset-shell tool with no parameters. This kills the current session and starts a new one.
What should I do if I see "Tool execution failed"?
Check that the server is running, your configuration uses absolute paths, and restart the client application after changing the configuration. Test the server directly with a pipe‑based command.